예제 #1
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public override void Validate()
 {
     base.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();
             }
         }
     }
 }
 /// <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();
             }
         }
     }
 }
예제 #3
0
 /// <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();
             }
         }
     }
 }
 /// <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 (FailoverPolicies != null)
     {
         foreach (var element2 in FailoverPolicies)
         {
             if (element2 != null)
             {
                 element2.Validate();
             }
         }
     }
 }