fix: Fixes timer migrations not compiling (#902)
This commit is contained in:
parent
d0aa6320f7
commit
5019ce9694
15 changed files with 1273 additions and 1209 deletions
|
|
@ -37,12 +37,9 @@ namespace SerializationGenerator
|
|||
|
||||
foreach (var serializableProperty in properties)
|
||||
{
|
||||
var propertyType = serializableProperty.Type;
|
||||
var type = compilation.GetTypeByMetadataName(propertyType)?.IsValueType == true
|
||||
|| SymbolMetadata.IsPrimitiveFromTypeDisplayString(propertyType) && propertyType != "bool"
|
||||
? $"{propertyType}{(serializableProperty.UsesSaveFlag == true ? "?" : "")}" : propertyType;
|
||||
|
||||
source.AppendLine($"{indent} internal readonly {type} {serializableProperty.Name};");
|
||||
SerializableMigrationRulesEngine.Rules[serializableProperty.Rule].GenerateMigrationProperty(
|
||||
source, compilation, $"{indent} ", serializableProperty
|
||||
);
|
||||
}
|
||||
|
||||
var innerIndent = $"{indent} ";
|
||||
|
|
@ -100,7 +97,8 @@ namespace SerializationGenerator
|
|||
source,
|
||||
$"{innerIndent} ",
|
||||
property,
|
||||
"entity"
|
||||
"entity",
|
||||
true
|
||||
);
|
||||
|
||||
source.AppendLine($"{innerIndent}}}\n{innerIndent}else\n{innerIndent}{{");
|
||||
|
|
@ -114,7 +112,8 @@ namespace SerializationGenerator
|
|||
source,
|
||||
innerIndent,
|
||||
property,
|
||||
"entity"
|
||||
"entity",
|
||||
true
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue