コード例 #1
0
        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;
        }
コード例 #2
0
 public void SetUp()
 {
     metadata = new MigrationMetadata();
 }