Interface IMigration
Base migration class.
Namespace: Eco.Core.Serialization.Migrations
Assembly: Eco.Core.dll
Syntax
public interface IMigration
Methods
Initialize(MigrationManager)
Declaration
void Initialize(MigrationManager migrationManager)
Parameters
Type | Name | Description |
---|---|---|
MigrationManager | migrationManager |
Migrate(MigrationContext)
Performs migration using current MigrationContext. Migrate(MigrationContext) method should follow a contract:
- It can only modify Reader and Schema.
- Schema may only be modified with CreateSchema(String) or other similar methods (no new instance creation!)
- If Reader modified then it should fully consume migrated content from original reader, otherwise it should set the reader at initial read position. General rule is to always return a reader positioned at beginning of serialized content.
Declaration
void Migrate(MigrationContext context)
Parameters
Type | Name | Description |
---|---|---|
MigrationContext | context |