Ejemplo n.º 1
0
 protected override void OnItemObjectValidate()
 {
     DescriptionProperty.CheckValueSet("");
     FromProperty.CheckValueSet("");
     ToProperty.CheckValueSet("");
     OnValidate();
 }
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="Microsoft.Rest.ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (FromProperty != null)
     {
         FromProperty.Validate();
     }
     if (To != null)
     {
         To.Validate();
     }
 }
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (FromProperty == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "FromProperty");
     }
     if (To == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "To");
     }
     if (FromProperty != null)
     {
         FromProperty.Validate();
     }
     if (To != null)
     {
         To.Validate();
     }
 }
Ejemplo n.º 4
0
 SetValue(FromProperty, value);
 set => this.SetValue(FromProperty, value);