/// <summary> /// Validate the object. /// </summary> /// <exception cref="ValidationException"> /// Thrown if validation fails /// </exception> public virtual void Validate() { if (SourceConnectionInfo == null) { throw new ValidationException(ValidationRules.CannotBeNull, "SourceConnectionInfo"); } if (TargetConnectionInfo == null) { throw new ValidationException(ValidationRules.CannotBeNull, "TargetConnectionInfo"); } if (SelectedSourceDatabases == null) { throw new ValidationException(ValidationRules.CannotBeNull, "SelectedSourceDatabases"); } if (SelectedTargetDatabases == null) { throw new ValidationException(ValidationRules.CannotBeNull, "SelectedTargetDatabases"); } if (SourceConnectionInfo != null) { SourceConnectionInfo.Validate(); } if (TargetConnectionInfo != null) { TargetConnectionInfo.Validate(); } }
/// <summary> /// Validate the object. /// </summary> /// <exception cref="ValidationException"> /// Thrown if validation fails /// </exception> public virtual void Validate() { if (SourceConnectionInfo == null) { throw new ValidationException(ValidationRules.CannotBeNull, "SourceConnectionInfo"); } if (SourceConnectionInfo != null) { SourceConnectionInfo.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(); } }