Added Nullable flags
This commit is contained in:
parent
f75542e45e
commit
0828883bef
3 changed files with 5 additions and 3 deletions
|
|
@ -1,3 +1,4 @@
|
|||
#nullable enable
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using System.Linq;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
#nullable enable
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using System.Linq;
|
||||
|
|
@ -29,7 +30,6 @@ public class NodePropBindGenerator : IIncrementalGenerator
|
|||
}
|
||||
}
|
||||
""";
|
||||
|
||||
public void Initialize(IncrementalGeneratorInitializationContext context)
|
||||
{
|
||||
context.RegisterPostInitializationOutput(ctx => ctx.AddSource(
|
||||
|
|
@ -108,8 +108,8 @@ public class NodePropBindGenerator : IIncrementalGenerator
|
|||
|
||||
if (attributeData is null) continue;
|
||||
|
||||
var nodeProp = attributeData.ConstructorArguments[0].Value as string;
|
||||
var godotProp = attributeData.ConstructorArguments[1].Value as string;
|
||||
var nodeProp = attributeData.ConstructorArguments[0].Value!.ToString();
|
||||
var godotProp = attributeData.ConstructorArguments[1].Value!.ToString();
|
||||
|
||||
var memberDefinition = new MemberDefinition(fieldSymbol.Type.Name, fieldSymbol.Name, nodeProp, godotProp);
|
||||
classDefinition.MemberDefinitions.Add(memberDefinition);
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
#nullable enable
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Immutable;
|
||||
using System.IO;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue