Пример #1
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (SourceInfo == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "SourceInfo");
     }
     if (SinkInfo == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "SinkInfo");
     }
     if (SourceInfo != null)
     {
         SourceInfo.Validate();
     }
     if (SinkInfo != null)
     {
         SinkInfo.Validate();
     }
     if (CustomContextTag != null)
     {
         if (CustomContextTag.Length > 192)
         {
             throw new ValidationException(ValidationRules.MaxLength, "CustomContextTag", 192);
         }
     }
 }
Пример #2
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (SourceInfo == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "SourceInfo");
     }
     if (SinkInfo == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "SinkInfo");
     }
     if (SourceInfo != null)
     {
         SourceInfo.Validate();
     }
     if (SinkInfo != null)
     {
         SinkInfo.Validate();
     }
 }