コード例 #1
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="Rest.ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (ShardKey != null)
     {
         ShardKey.Validate();
     }
 }
コード例 #2
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public override void Validate()
 {
     base.Validate();
     if (DatabaseName == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "DatabaseName");
     }
     if (ShardKey != null)
     {
         ShardKey.Validate();
     }
 }