Show / Hide Table of Contents

Class ClassMigrationBase

Inheritance
System.Object
ClassMigrationBase
AggregateMigration
InstanceMigration
Implements
IInstanceMigration
IReferenceMigration
IClassMigration
IMigration
Namespace: Eco.Core.Serialization.Migrations
Assembly: Eco.Core.dll
Syntax
public abstract class ClassMigrationBase : Object, IInstanceMigration, IReferenceMigration, IClassMigration, IMigration

Constructors

ClassMigrationBase()

Declaration
protected ClassMigrationBase()

Properties

CompatibleSchemaTypes

Declaration
public abstract IEnumerable<string> CompatibleSchemaTypes { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<System.String>

MigrationManager

Declaration
protected MigrationManager MigrationManager { get; }
Property Value
Type Description
MigrationManager

Methods

Initialize(MigrationManager)

Declaration
public virtual void Initialize(MigrationManager migrationManager)
Parameters
Type Name Description
MigrationManager migrationManager

Migrate(MigrationContext)

Declaration
public void Migrate(MigrationContext context)
Parameters
Type Name Description
MigrationContext context

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 abstract void MigrateInstance(MigrationContext context)
Parameters
Type Name Description
MigrationContext context

MigrateReference(MigrationContext)

Migrates an reference 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 abstract void MigrateReference(MigrationContext context)
Parameters
Type Name Description
MigrationContext context

Implements

IInstanceMigration
IReferenceMigration
IClassMigration
IMigration

Extension Methods

PropertyChanges.FirePropertyChanged(Object, String)
PropertyChanges.FirePropertyChanged(Object, String, Object, Object)
PropertyChanges.FirePropertyChanged(Object, MemberChangedBeforeAfterEventArgs)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾