Class ClassRemoveMigration
Migration for a removed class which allows to invoke Eco.Core.Serialization.Migrations.ClassRemoveMigration.onRemove callback for removed instances members data.
Inheritance
System.Object
ClassRemoveMigration
Assembly: Eco.Core.dll
Syntax
public class ClassRemoveMigration : InstanceMigration, IInstanceMigration, IReferenceMigration, IClassMigration, IMigration
Constructors
ClassRemoveMigration(String)
Declaration
public ClassRemoveMigration(string compatibleType)
Parameters
Type |
Name |
Description |
System.String |
compatibleType |
|
ClassRemoveMigration(String, String[], Action<Object[]>)
Declaration
public ClassRemoveMigration(string compatibleType, string[] memberNames, Action<object[]> onRemove)
Parameters
Type |
Name |
Description |
System.String |
compatibleType |
|
System.String[] |
memberNames |
|
System.Action<System.Object[]> |
onRemove |
|
Methods
MigrateInstance(MigrationContext)
Migrates an instance with provided context
.
It may modify context
with one of following migration results:
- ReferenceTypeName != null means that binary content was fully consumed and a reference should be serialized instead. It should contains the referenced object id in ReferenceId;
- Schema modified and output schema is a class schema, it means that original class binary data was replaced with another class binary data and it should use new object serializer;
- Schema modified and output schema is the cached serializer schema, it means that original binary content was consumed and object instance created and cached for upcoming deserialization call;
- Schema modified, but output schema not class or cached object, it means that Reader contains compatible binary data. If reader wasn't modified then it will be reset to initial position.
- Schema not modified, if Reader modified then it should be re-serialized with original serializer or just reset reader position otherwise.
Declaration
public override void MigrateInstance(MigrationContext context)
Parameters
Overrides
Implements
Extension Methods