/// <summary> /// Validate the object. /// </summary> /// <exception cref="Rest.ValidationException"> /// Thrown if validation fails /// </exception> public virtual void Validate() { if (ShardKey != null) { ShardKey.Validate(); } }
/// <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(); } }