/// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public override void Validate()
 {
     base.Validate();
     if (SelectedDatabases == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "SelectedDatabases");
     }
     if (BackupBlobShare == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "BackupBlobShare");
     }
     if (SelectedDatabases != null)
     {
         foreach (var element in SelectedDatabases)
         {
             if (element != null)
             {
                 element.Validate();
             }
         }
     }
     if (BackupFileShare != null)
     {
         BackupFileShare.Validate();
     }
     if (BackupBlobShare != null)
     {
         BackupBlobShare.Validate();
     }
 }
Beispiel #2
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (ConnectionInfo == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "ConnectionInfo");
     }
     if (BackupFileShare == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "BackupFileShare");
     }
     if (SelectedCertificates == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "SelectedCertificates");
     }
     if (ConnectionInfo != null)
     {
         ConnectionInfo.Validate();
     }
     if (BackupFileShare != null)
     {
         BackupFileShare.Validate();
     }
     if (SelectedCertificates != null)
     {
         foreach (var element in SelectedCertificates)
         {
             if (element != null)
             {
                 element.Validate();
             }
         }
     }
 }
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (SelectedDatabases == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "SelectedDatabases");
     }
     if (StorageResourceId == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "StorageResourceId");
     }
     if (SourceConnectionInfo == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "SourceConnectionInfo");
     }
     if (TargetConnectionInfo == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "TargetConnectionInfo");
     }
     if (AzureApp == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "AzureApp");
     }
     if (SelectedDatabases != null)
     {
         foreach (var element in SelectedDatabases)
         {
             if (element != null)
             {
                 element.Validate();
             }
         }
     }
     if (BackupFileShare != null)
     {
         BackupFileShare.Validate();
     }
     if (SourceConnectionInfo != null)
     {
         SourceConnectionInfo.Validate();
     }
     if (TargetConnectionInfo != null)
     {
         TargetConnectionInfo.Validate();
     }
     if (AzureApp != null)
     {
         AzureApp.Validate();
     }
 }
Beispiel #4
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (Name == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Name");
     }
     if (RestoreDatabaseName == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "RestoreDatabaseName");
     }
     if (BackupFileShare != null)
     {
         BackupFileShare.Validate();
     }
 }