public static MigrationMetadata GetMetadataForMigration(Type type) { var migrationAttribute = type.GetOneAttribute<MigrationAttribute>(); var metadata = new MigrationMetadata { Type = type, Version = migrationAttribute.Version }; foreach (MigrationTraitAttribute traitAttribute in type.GetAllAttributes<MigrationTraitAttribute>()) metadata.AddTrait(traitAttribute.Name, traitAttribute.Value); return metadata; }
public void SetUp() { metadata = new MigrationMetadata(); }