예제 #1
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (ConsistencyPolicy != null)
     {
         ConsistencyPolicy.Validate();
     }
     if (Locations != null)
     {
         foreach (var element in Locations)
         {
             if (element != null)
             {
                 element.Validate();
             }
         }
     }
     if (Cors != null)
     {
         foreach (var element1 in Cors)
         {
             if (element1 != null)
             {
                 element1.Validate();
             }
         }
     }
 }
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (Locations == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "Locations");
     }
     if (ConsistencyPolicy != null)
     {
         ConsistencyPolicy.Validate();
     }
     if (Locations != null)
     {
         foreach (var element in Locations)
         {
             if (element != null)
             {
                 element.Validate();
             }
         }
     }
     if (Cors != null)
     {
         foreach (var element1 in Cors)
         {
             if (element1 != null)
             {
                 element1.Validate();
             }
         }
     }
 }
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (ConsistencyPolicy != null)
     {
         ConsistencyPolicy.Validate();
     }
     if (WriteLocations != null)
     {
         foreach (var element in WriteLocations)
         {
             if (element != null)
             {
                 element.Validate();
             }
         }
     }
     if (ReadLocations != null)
     {
         foreach (var element1 in ReadLocations)
         {
             if (element1 != null)
             {
                 element1.Validate();
             }
         }
     }
     if (Locations != null)
     {
         foreach (var element2 in Locations)
         {
             if (element2 != null)
             {
                 element2.Validate();
             }
         }
     }
     if (FailoverPolicies != null)
     {
         foreach (var element3 in FailoverPolicies)
         {
             if (element3 != null)
             {
                 element3.Validate();
             }
         }
     }
     if (Cors != null)
     {
         foreach (var element4 in Cors)
         {
             if (element4 != null)
             {
                 element4.Validate();
             }
         }
     }
 }