Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

Commit

Permalink
extracted constants
Browse files Browse the repository at this point in the history
  • Loading branch information
KSchlobohm committed Mar 26, 2021
1 parent 153e609 commit 879ecf3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/MSBuild.Abstractions/ProjectItemHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ public static bool IsReferencingSystemWeb(ProjectItemElement item) =>

public static bool IsReferencingSettingsSingleFileGenerator(ProjectItemElement item)
{
var metadata = item.Children.FirstOrDefault(child => "Generator".Equals(child.ElementName, StringComparison.Ordinal) ) as ProjectMetadataElement;
return metadata is null ? false : metadata.Value.Equals("SettingsSingleFileGenerator", StringComparison.Ordinal);
var metadata = item.Children.FirstOrDefault(child => MSBuildFacts.EmbeddedResourceGeneratorProperty.Equals(child.ElementName, StringComparison.Ordinal) ) as ProjectMetadataElement;
return metadata is null ? false : metadata.Value.Equals(MSBuildFacts.SettingsSingleFileGenerator, StringComparison.Ordinal);
}

}
Expand Down
2 changes: 2 additions & 0 deletions src/MSBuild.Conversion.Facts/MSBuildFacts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -298,5 +298,7 @@ public static class MSBuildFacts
public const string Net5 = "net5.0";
public const string Net5Windows = "net5.0-windows";
public const string AppConfig = "App.config";
public const string EmbeddedResourceGeneratorProperty = "Generator";
public const string SettingsSingleFileGenerator = "SettingsSingleFileGenerator";
}
}

0 comments on commit 879ecf3

Please sign in to comment.