Example #1
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (AcceptedNames == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "AcceptedNames");
     }
     if (Conditions == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Conditions");
     }
     if (StoredVersions == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "StoredVersions");
     }
     if (AcceptedNames != null)
     {
         AcceptedNames.Validate();
     }
     if (Conditions != null)
     {
         foreach (var element in Conditions)
         {
             if (element != null)
             {
                 element.Validate();
             }
         }
     }
 }
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="Microsoft.Rest.ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (AcceptedNames != null)
     {
         AcceptedNames.Validate();
     }
     if (Conditions != null)
     {
         foreach (var element in Conditions)
         {
             if (element != null)
             {
                 element.Validate();
             }
         }
     }
 }