This commit is contained in:
h z
2024-07-11 12:54:28 +01:00
parent 00bf1b438e
commit 3699cb3383

View File

@@ -16,7 +16,7 @@ public class DataTypeGenerator : ISourceGenerator
public void Execute(GeneratorExecutionContext context)
{
var classesTxt = context.AdditionalFiles
AdditionalText? classesTxt = context.AdditionalFiles
.FirstOrDefault(f => Path.GetFileName(f.Path) == "BaseTypes");
if (classesTxt != null)
{
@@ -37,7 +37,7 @@ public class DataTypeGenerator : ISourceGenerator
{
sb.AppendLine($" public static StringName {type} = \"{type}\";");
sxa.AppendLine($" public static DataType {type} = new DataType(BaseDataTypeNames.{type});");
sxa.AppendLine($" public static DataType {type}Array = new DataType({type})");
sxa.AppendLine($" public static DataType {type}Array = new DataType({type});");
}
sb.AppendLine(" }");