Browse Source
Merge branch 'master' into fixes/textProcessing
pull/10009/head
Max Katz
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
5 additions and
5 deletions
-
src/tools/DevGenerators/CompositionGenerator/Generator.ListProxy.cs
-
src/tools/DevGenerators/CompositionGenerator/Generator.cs
-
src/tools/DevGenerators/EnumMemberDictionaryGenerator.cs
-
src/tools/DevGenerators/GetProcAddressInitialization.cs
|
|
|
@ -112,7 +112,7 @@ class Template |
|
|
|
|
|
|
|
var defs = cl.Members.OfType<MethodDeclarationSyntax>().First(m => m.Identifier.Text == "InitializeDefaults"); |
|
|
|
|
|
|
|
cl = cl.ReplaceNode(defs.Body, defs.Body.AddStatements( |
|
|
|
cl = cl.ReplaceNode(defs.Body!, defs.Body!.AddStatements( |
|
|
|
|
|
|
|
ParseStatement($"_list = new ServerListProxyHelper<{itemType}, {serverItemType}>(this);"))); |
|
|
|
|
|
|
|
|
|
|
|
@ -297,8 +297,8 @@ namespace Avalonia.SourceGenerator.CompositionGenerator |
|
|
|
server = server.WithBaseList( |
|
|
|
server.BaseList?.AddTypes(SimpleBaseType(ParseTypeName(impl.ServerName)))); |
|
|
|
|
|
|
|
client = client.AddMembers( |
|
|
|
ParseMemberDeclaration($"{impl.ServerName} {impl.Name}.Server => Server;")); |
|
|
|
if(ParseMemberDeclaration($"{impl.ServerName} {impl.Name}.Server => Server;") is { } member) |
|
|
|
client = client.AddMembers(member); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -32,7 +32,7 @@ public class EnumMemberDictionaryGenerator : IIncrementalGenerator |
|
|
|
).Collect(); |
|
|
|
context.RegisterSourceOutput(all, static (context, methods) => |
|
|
|
{ |
|
|
|
foreach (var typeGroup in methods.GroupBy(f => f.ContainingType, SymbolEqualityComparer.Default)) |
|
|
|
foreach (var typeGroup in methods.GroupBy<IMethodSymbol,ISymbol>(f => f.ContainingType, SymbolEqualityComparer.Default)) |
|
|
|
{ |
|
|
|
var classBuilder = new StringBuilder(); |
|
|
|
if (typeGroup.Key.ContainingNamespace != null) |
|
|
|
|
|
|
|
@ -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, SymbolEqualityComparer.Default)) |
|
|
|
foreach (var typeGroup in methods.GroupBy<IMethodSymbol,ISymbol>(f => f.ContainingType, SymbolEqualityComparer.Default)) |
|
|
|
{ |
|
|
|
var nextContext = 0; |
|
|
|
var contexts = new Dictionary<string, int>(); |
|
|
|
|