Skip to content

Conversation

@Forgind
Copy link
Contributor

@Forgind Forgind commented Jan 18, 2024

No description provided.

@ghost ghost added Area-Workloads untriaged Request triage from a team member labels Jan 18, 2024
protected void UpdateInstallMode(SdkFeatureBand sdkFeatureBand, bool newMode)
{
string path = Path.Combine(WorkloadInstallType.GetInstallStateFolder(sdkFeatureBand, DotNetHome), "default.json");
var installStateContents = File.Exists(path) ? InstallStateContents.FromString(File.ReadAllText(path)) : new InstallStateContents();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we reduce duplication with something like (code seems to repeat a few times)

GetInstallStateContents(string path) =>
    InstallStateContents.FromString(File.ReadAllText(path)) : new InstallStateContents();

@Forgind Forgind merged commit 5395566 into dotnet:release/8.0.3xx Jan 19, 2024
@Forgind Forgind deleted the optimize-noop branch January 19, 2024 23:30
Forgind added a commit to Forgind/sdk that referenced this pull request Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Workloads untriaged Request triage from a team member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants