Ejemplo n.º 1
0
 protected internal BackupRestoreView.BackupSchedule ToBackupScheduleView()
 {
     BackupRestoreView.BackupSchedule backupScheduleView = null;
     if (this.BackupScheduleType == BackupScheduleType.FrequencyBased)
     {
         backupScheduleView = ((FrequencyBasedBackupSchedule)this).ToFrequencyBasedBackupScheduleView();
     }
     else if (this.BackupScheduleType == BackupScheduleType.TimeBased)
     {
         backupScheduleView = ((TimeBasedBackupSchedule)this).ToTimeBasedBackupScheduleView();
     }
     return(backupScheduleView);
 }
Ejemplo n.º 2
0
        protected internal static BackupSchedule FromBackupScheduleView(BackupRestoreView.BackupSchedule backupScheduleView)
        {
            BackupSchedule backupSchedule = null;

            if (backupScheduleView.ScheduleKind == Enums.BackupScheduleType.FrequencyBased)
            {
                backupSchedule =
                    FrequencyBasedBackupSchedule.FromFrequencyBasedBackupScheduleView(
                        (BackupRestoreView.FrequencyBasedBackupSchedule)backupScheduleView);
            }
            else if (backupScheduleView.ScheduleKind == BackupScheduleType.TimeBased)
            {
                backupSchedule =
                    TimeBasedBackupSchedule.FromTimeBasedBackupScheduleView(
                        (BackupRestoreView.TimeBasedBackupSchedule)backupScheduleView);
            }
            return(backupSchedule);
        }