示例#1
0
        public MigrationMetadata([NotNull] string migrationId)
        {
            Check.NotEmpty(migrationId, "migrationId");

            if (!MigrationMetadataExtensions.IsValidMigrationId(migrationId))
            {
                throw new ArgumentException(Strings.FormatInvalidMigrationId(migrationId));
            }

            _migrationId = migrationId;
        }
示例#2
0
        public MigrationInfo([NotNull] string migrationId, [NotNull] string productVersion)
        {
            Check.NotEmpty(migrationId, "migrationId");
            Check.NotEmpty(productVersion, "productVersion");

            if (!MigrationMetadataExtensions.IsValidMigrationId(migrationId))
            {
                throw new ArgumentException(Strings.InvalidMigrationId(migrationId));
            }

            _migrationId    = migrationId;
            _productVersion = productVersion;
        }
示例#3
0
        public MigrationMetadata([NotNull] string migrationId, [NotNull] Type contextType)
        {
            Check.NotEmpty(migrationId, "migrationId");
            Check.NotNull(contextType, "contextType");

            if (!MigrationMetadataExtensions.IsValidMigrationId(migrationId))
            {
                throw new ArgumentException(Strings.FormatInvalidMigrationId(migrationId));
            }

            _migrationId = migrationId;
            _contextType = contextType;
        }