示例#1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ValidationResult" /> class.
 /// </summary>
 /// <param name="sServity">The servity.</param>
 /// <param name="strMessage">The message.</param>
 /// <param name="oSource">The source.</param>
 /// <param name="strPropertyName">Name of the property.</param>
 /// <param name="oValue">The value.</param>
 public ValidationResult(Servity sServity, string strMessage, object oSource, string strPropertyName, object oValue)
 {
     this.Id           = Guid.NewGuid();
     this.Timestamp    = DateTime.Now;
     this.Servity      = sServity;
     this.Message      = strMessage;
     this.Source       = oSource;
     this.PropertyName = strPropertyName;
     this.Value        = oValue;
 }
示例#2
0
 /// <summary>
 /// Adds the specified validation.
 /// </summary>
 /// <param name="sServity">The s servity.</param>
 /// <param name="strMessage">The string message.</param>
 /// <param name="oSource">The o source.</param>
 /// <param name="strPropertyName">Name of the string property.</param>
 /// <param name="oValue">The o value.</param>
 public void Add(Servity sServity, string strMessage, object oSource, string strPropertyName, object oValue)
 {
     Add(new ValidationResult(sServity, strMessage, oSource, strPropertyName, oValue));
 }