示例#1
0
        private MigrationPath _BuildMigrationPathUsingSequentialVersions(IContentMigrator migrator, int fromVersion,
            int toVersion)
        {
            MigrationPath migrationPath = new MigrationPath();

            while (fromVersion != toVersion) {
                IMigrationSegment segment = _FindExactMigration(migrator, fromVersion, fromVersion + 1);
                if (segment == null) return null;

                migrationPath.Add(segment);
                fromVersion++;
            }

            return migrationPath;
        }
示例#2
0
        private MigrationPath _BuildMigrationPathUsingSequentialVersions(IContentMigrator migrator, int fromVersion, int toVersion)
        {
            MigrationPath migrationPath = new MigrationPath();

            while (fromVersion != toVersion)
            {
                IMigrationSegment segment = _FindExactMigration(migrator, fromVersion, fromVersion + 1);
                if (segment == null)
                {
                    return(null);
                }

                migrationPath.Add(segment);
                fromVersion++;
            }

            return(migrationPath);
        }