Browse Source
Merge pull request #8902 from workgroupengineering/fixes/Warnings/DevGenerators/RS1024
fix(DevGenerators): Warning RS1024 Use SymbolEqualityComparer when comparing symbols
pull/8911/head
Max Katz
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
4 additions and
4 deletions
-
src/tools/DevGenerators/EnumMemberDictionaryGenerator.cs
-
src/tools/DevGenerators/GetProcAddressInitialization.cs
|
|
|
@ -32,7 +32,7 @@ public class EnumMemberDictionaryGenerator : IIncrementalGenerator |
|
|
|
).Collect(); |
|
|
|
context.RegisterSourceOutput(all, static (context, methods) => |
|
|
|
{ |
|
|
|
foreach (var typeGroup in methods.GroupBy(f => f.ContainingType)) |
|
|
|
foreach (var typeGroup in methods.GroupBy(f => f.ContainingType, SymbolEqualityComparer.Default)) |
|
|
|
{ |
|
|
|
var classBuilder = new StringBuilder(); |
|
|
|
if (typeGroup.Key.ContainingNamespace != null) |
|
|
|
@ -91,4 +91,4 @@ public class EnumMemberDictionaryGenerator : IIncrementalGenerator |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -34,7 +34,7 @@ public class GetProcAddressInitializationGenerator : IIncrementalGenerator |
|
|
|
var all = fieldsWithAttribute.Collect(); |
|
|
|
context.RegisterSourceOutput(all, static (context, methods) => |
|
|
|
{ |
|
|
|
foreach (var typeGroup in methods.GroupBy(f => f.ContainingType)) |
|
|
|
foreach (var typeGroup in methods.GroupBy(f => f.ContainingType, SymbolEqualityComparer.Default)) |
|
|
|
{ |
|
|
|
var nextContext = 0; |
|
|
|
var contexts = new Dictionary<string, int>(); |
|
|
|
@ -335,4 +335,4 @@ public class GetProcAddressInitializationGenerator : IIncrementalGenerator |
|
|
|
return name.ToString(); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|