Exemple #1
0
 protected override void InternalProcessRecord()
 {
     this.SupportsCutover = false;
     if (this.Imap || this.ExchangeOutlookAnywhere)
     {
         this.SupportsCutover = MigrationSession.SupportsCutover(base.DataProvider);
     }
     if (this.ExchangeOutlookAnywhere)
     {
         this.InternalProcessExchangeOutlookAnywhere(base.DataProvider);
         return;
     }
     if (this.ExchangeRemoteMove && this.Autodiscover)
     {
         this.InternalProcessExchangeRemoteMoveAutoDiscover();
         return;
     }
     if (this.PSTImport)
     {
         this.InternalProcessPSTImport();
         return;
     }
     if (this.PublicFolder)
     {
         this.InternalProcessPublicFolder();
         return;
     }
     if (this.endpoint != null)
     {
         this.InternalProcessEndpoint(false);
         return;
     }
     MigrationLogger.Log(MigrationEventType.Error, "TestMigrationServerAvailability.InternalProcessRecord: Wrong protocol", new object[0]);
     this.WriteError(new TestMigrationServerAvailabilityProtocolArgumentException());
 }
Exemple #2
0
 internal static void CompleteMigrationSession(
     Action <MigrationSession> upsertMigrationSession,
     MigrationSession migrationSession)
 {
     migrationSession.CompleteMigrationSession();
     upsertMigrationSession(migrationSession);
 }
Exemple #3
0
 internal static void FailMigrationSession(
     Action <MigrationSession> upsertMigrationSession,
     MigrationSession migrationSession,
     MigrationException migrationException)
 {
     migrationSession.FailMigrationSession(migrationException);
     upsertMigrationSession(migrationSession);
 }
Exemple #4
0
 private static void UpdateTo(
     IRepositoryToMigrate repositoryToMigrate,
     IRepository repository,
     MigrationSession migrationSession)
 {
     ApplyMigrations(
         repositoryToMigrate,
         repository,
         migrationSession);
 }
Exemple #5
0
 private static void ApplyMigrations(
     IRepositoryToMigrate repositoryToMigrate,
     IRepository repository,
     MigrationSession migrationSession)
 {
     foreach (Migration migration in migrationSession.MigrationsToBeApplied)
     {
         ApplyMigration(
             repositoryToMigrate,
             repository,
             new RepositoryMigration(migration));
     }
 }
Exemple #6
0
        internal static bool TryStartMigrationSession(
            Action <MigrationSession> addMigrationSession,
            bool migrationSessionStarted,
            IEnumerable <Migration> migrationsToBeApplied,
            out MigrationSession migrationSession)
        {
            if (migrationSessionStarted)
            {
                migrationSession = new MigrationSession(
                    migrationsToBeApplied,
                    GetFirstVersionOrDefault(migrationsToBeApplied),
                    GetLastVersionOrDefault(migrationsToBeApplied));
                addMigrationSession(migrationSession);
            }
            else
            {
                migrationSession = null;
            }

            return(migrationSessionStarted);
        }