diff --git a/CHANGELOG.md b/CHANGELOG.md index 70d1bb99..f9e35814 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ Please ADD ALL Changes to the UNRELEASED SECTION and not a specific release ### Fixed ### Changed - Dependencies - Updated FunFair.CodeAnalysis to 7.2.25.2636 +- SDK - Updated DotNet SDK to 11.0.100-rc.3.26522.148 ### Deprecated ### Removed ### Deployment Changes diff --git a/src/Credfeto.Enumeration.Source.Generation.Tests/CompilationHelpers.cs b/src/Credfeto.Enumeration.Source.Generation.Tests/CompilationHelpers.cs index 1ae07418..ab66f9f1 100644 --- a/src/Credfeto.Enumeration.Source.Generation.Tests/CompilationHelpers.cs +++ b/src/Credfeto.Enumeration.Source.Generation.Tests/CompilationHelpers.cs @@ -14,7 +14,7 @@ public static CSharpCompilation CreateCompilation( IEnumerable? additionalReferences = null ) { - HashSet addedPaths = new(StringComparer.OrdinalIgnoreCase); + HashSet addedPaths = [with(StringComparer.OrdinalIgnoreCase)]; List references = []; AddReference(references, addedPaths, typeof(object)); diff --git a/src/Credfeto.Enumeration.Source.Generation.Tests/Extensions/FieldSymbolExtensionsTests.cs b/src/Credfeto.Enumeration.Source.Generation.Tests/Extensions/FieldSymbolExtensionsTests.cs index 6b7a14df..acfd238e 100644 --- a/src/Credfeto.Enumeration.Source.Generation.Tests/Extensions/FieldSymbolExtensionsTests.cs +++ b/src/Credfeto.Enumeration.Source.Generation.Tests/Extensions/FieldSymbolExtensionsTests.cs @@ -44,7 +44,7 @@ public void FormatMemberReturnsFormattedCaseLine() public void IsSkipEnumValueReturnsFalseForFirstUniqueValue() { IFieldSymbol field = MakeField("A", constantValue: 0); - HashSet names = new(System.StringComparer.Ordinal); + HashSet names = [with(System.StringComparer.Ordinal)]; bool result = field.IsSkipEnumValue(names: names, equalsValueIdentifiers: null); @@ -57,7 +57,7 @@ public void IsSkipEnumValueReturnsTrueForDuplicateConstantValue() { IFieldSymbol fieldA = MakeField("A", constantValue: 0); IFieldSymbol fieldB = MakeField("B", constantValue: 0); - HashSet names = new(System.StringComparer.Ordinal); + HashSet names = [with(System.StringComparer.Ordinal)]; bool firstResult = fieldA.IsSkipEnumValue(names: names, equalsValueIdentifiers: null); bool secondResult = fieldB.IsSkipEnumValue(names: names, equalsValueIdentifiers: null); @@ -73,7 +73,7 @@ public void IsSkipEnumValueReturnsTrueWhenEqualsValueIdentifierPointsToExistingN IFieldSymbol fieldB = MakeField("B", constantValue: 0); // Pre-populate names with "A" — simulating that A was already resolved as a member name - HashSet names = new(System.StringComparer.Ordinal) { "A" }; + HashSet names = [with(System.StringComparer.Ordinal), "A"]; Dictionary equalsIdentifiers = new(System.StringComparer.Ordinal) { ["B"] = "A" }; bool result = fieldB.IsSkipEnumValue(names: names, equalsValueIdentifiers: equalsIdentifiers); @@ -85,7 +85,7 @@ public void IsSkipEnumValueReturnsTrueWhenEqualsValueIdentifierPointsToExistingN public void IsSkipEnumValueReturnsFalseWhenEqualsValueIdentifierPointsToUnseenName() { IFieldSymbol fieldB = MakeField("B", constantValue: 1); - HashSet names = new(System.StringComparer.Ordinal); + HashSet names = [with(System.StringComparer.Ordinal)]; Dictionary equalsIdentifiers = new(System.StringComparer.Ordinal) { ["B"] = "UnknownName" }; // "UnknownName" has never been added to names, so it's not skipped via identifier @@ -100,7 +100,7 @@ public void IsSkipEnumValueReturnsFalseWhenEqualsValueIdentifierPointsToUnseenNa public void IsSkipEnumValueReturnsFalseWhenNullConstantValue() { IFieldSymbol field = MakeField("A", constantValue: null); - HashSet names = new(System.StringComparer.Ordinal); + HashSet names = [with(System.StringComparer.Ordinal)]; bool result = field.IsSkipEnumValue(names: names, equalsValueIdentifiers: null); diff --git a/src/Credfeto.Enumeration.Source.Generation/Receivers/SyntaxExtractor.cs b/src/Credfeto.Enumeration.Source.Generation/Receivers/SyntaxExtractor.cs index a1600825..93ea9a07 100644 --- a/src/Credfeto.Enumeration.Source.Generation/Receivers/SyntaxExtractor.cs +++ b/src/Credfeto.Enumeration.Source.Generation/Receivers/SyntaxExtractor.cs @@ -236,7 +236,7 @@ in SeparatedSyntaxList members continue; } - result ??= new(StringComparer.Ordinal); + result ??= [with(StringComparer.Ordinal)]; result[member.Identifier.ValueText] = identifierName.Identifier.ValueText; } diff --git a/src/SourceGenerator.props b/src/SourceGenerator.props index a62287da..79cba584 100644 --- a/src/SourceGenerator.props +++ b/src/SourceGenerator.props @@ -2,7 +2,7 @@ - + diff --git a/src/global.json b/src/global.json index 3400819d..e796e8fc 100644 --- a/src/global.json +++ b/src/global.json @@ -1,7 +1,7 @@ { "sdk": { - "version": "10.0.403", - "allowPrerelease": false, + "version": "11.0.100-rc.3.26522.148", + "allowPrerelease": true, "rollForward": "latestPatch" }, "test": {