fix(codegen): Fixes various code gen issues. Adds better embedded serialization support (#688)
* Adds save flag support (see `ElvenGlasses` for an example) * Updates AOSAttributes so they are code genned * Fixes embedded object support by adding an `IRawSerializable` * Fixes various inconsistencies in serializing with codegen
This commit is contained in:
parent
69af652a18
commit
2c8097f707
54 changed files with 787 additions and 507 deletions
|
|
@ -38,7 +38,7 @@ namespace SerializableMigration
|
|||
new PrimitiveUOTypeMigrationRule(),
|
||||
new SerializableInterfaceMigrationRule(),
|
||||
new SerializationMethodSignatureMigrationRule(),
|
||||
new EmbeddedSerializableMigrationRule(),
|
||||
new RawSerializableMigrationRule(),
|
||||
new TimerMigrationRule()
|
||||
};
|
||||
|
||||
|
|
@ -55,7 +55,8 @@ namespace SerializableMigration
|
|||
ImmutableArray<AttributeData> attributes,
|
||||
ImmutableArray<INamedTypeSymbol> serializableTypes,
|
||||
ImmutableArray<INamedTypeSymbol> embeddedSerializableTypes,
|
||||
ISymbol? parentSymbol = default
|
||||
ISymbol? parentSymbol,
|
||||
IMethodSymbol? serializablePropertyFlagGetter
|
||||
)
|
||||
{
|
||||
string propertyName;
|
||||
|
|
@ -84,7 +85,8 @@ namespace SerializableMigration
|
|||
attributes,
|
||||
serializableTypes,
|
||||
embeddedSerializableTypes,
|
||||
parentSymbol
|
||||
parentSymbol,
|
||||
serializablePropertyFlagGetter
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -96,7 +98,8 @@ namespace SerializableMigration
|
|||
ImmutableArray<AttributeData> attributes,
|
||||
ImmutableArray<INamedTypeSymbol> serializableTypes,
|
||||
ImmutableArray<INamedTypeSymbol> embeddedSerializableTypes,
|
||||
ISymbol? parentSymbol = default
|
||||
ISymbol? parentSymbol,
|
||||
IMethodSymbol? serializablePropertyFlagGetter
|
||||
)
|
||||
{
|
||||
foreach (var rule in Rules.Values)
|
||||
|
|
@ -116,6 +119,7 @@ namespace SerializableMigration
|
|||
Name = propertyName,
|
||||
Type = propertyType.ToDisplayString(),
|
||||
Order = order,
|
||||
UsesSaveFlag = serializablePropertyFlagGetter != null ? true : null,
|
||||
Rule = rule.RuleName,
|
||||
RuleArguments = ruleArguments
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue