Class ConcreteTypeMigration<TDiscriminator>
Migration from base type to multiple concrete types by single (discriminator) field value.
Inheritance
System.Object
ConcreteTypeMigration<TDiscriminator>
Inherited Members
Namespace: Eco.Core.Serialization.Migrations
Assembly: Eco.Core.dll
Syntax
public class ConcreteTypeMigration<TDiscriminator> : ConcreteTypeMigration, IInstanceMigration, IReferenceMigration, IClassMigration, IMigration
Type Parameters
Name | Description |
---|---|
TDiscriminator |
Constructors
ConcreteTypeMigration(String, String, Func<TDiscriminator, String>)
Initializes a new instance of the ConcreteTypeMigration<TDiscriminator> class.
Declaration
public ConcreteTypeMigration(string baseTypeName, string discriminatorName, Func<TDiscriminator, string> typeMapper)
Parameters
Type | Name | Description |
---|---|---|
System.String | baseTypeName | Base type name (from which concrete types will be expanded). |
System.String | discriminatorName | Name of property or field in base object which will be used to determine concrete type name with typeMapper. |
System.Func<TDiscriminator, System.String> | typeMapper | Function receives discriminator value and returns concrete type name evaluated from discriminator. |