Example #1
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (Sku != null)
     {
         Sku.Validate();
     }
     if (Identity != null)
     {
         Identity.Validate();
     }
     if (CustomDomain != null)
     {
         CustomDomain.Validate();
     }
     if (Encryption != null)
     {
         Encryption.Validate();
     }
     if (SasPolicy != null)
     {
         SasPolicy.Validate();
     }
     if (KeyPolicy != null)
     {
         KeyPolicy.Validate();
     }
     if (AzureFilesIdentityBasedAuthentication != null)
     {
         AzureFilesIdentityBasedAuthentication.Validate();
     }
     if (NetworkRuleSet != null)
     {
         NetworkRuleSet.Validate();
     }
 }
Example #2
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public override void Validate()
 {
     base.Validate();
     if (Sku != null)
     {
         Sku.Validate();
     }
     if (Identity != null)
     {
         Identity.Validate();
     }
     if (CustomDomain != null)
     {
         CustomDomain.Validate();
     }
     if (SasPolicy != null)
     {
         SasPolicy.Validate();
     }
     if (KeyPolicy != null)
     {
         KeyPolicy.Validate();
     }
     if (Encryption != null)
     {
         Encryption.Validate();
     }
     if (AzureFilesIdentityBasedAuthentication != null)
     {
         AzureFilesIdentityBasedAuthentication.Validate();
     }
     if (NetworkRuleSet != null)
     {
         NetworkRuleSet.Validate();
     }
     if (PrivateEndpointConnections != null)
     {
         foreach (var element in PrivateEndpointConnections)
         {
             if (element != null)
             {
                 element.Validate();
             }
         }
     }
     if (BlobRestoreStatus != null)
     {
         BlobRestoreStatus.Validate();
     }
 }
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (Sku == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Sku");
     }
     if (Kind == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Kind");
     }
     if (Location == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Location");
     }
     if (Sku != null)
     {
         Sku.Validate();
     }
     if (Identity != null)
     {
         Identity.Validate();
     }
     if (SasPolicy != null)
     {
         SasPolicy.Validate();
     }
     if (KeyPolicy != null)
     {
         KeyPolicy.Validate();
     }
     if (CustomDomain != null)
     {
         CustomDomain.Validate();
     }
     if (Encryption != null)
     {
         Encryption.Validate();
     }
     if (NetworkRuleSet != null)
     {
         NetworkRuleSet.Validate();
     }
     if (AzureFilesIdentityBasedAuthentication != null)
     {
         AzureFilesIdentityBasedAuthentication.Validate();
     }
 }