Ejemplo n.º 1
0
 /// <summary>
 /// Report a new <see cref="RequestValidationFailure"/>
 /// </summary>
 /// <param name="issue"><see cref="RequestValidationIssue"/> classification</param>
 /// <param name="property">Failing property name</param>
 /// <param name="message">Failure text</param>
 public void Fail(RequestValidationIssue issue, string property, string message)
 {
     this.Failures.Add(new RequestValidationFailure
     {
         Issue   = issue,
         Message = message
     });
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Report a new <see cref="RequestValidationFailure"/>
 /// </summary>
 /// <param name="issue"><see cref="RequestValidationIssue"/> classification</param>
 /// <param name="property">Failing property name</param>
 /// <param name="message">Failure text</param>
 /// <param name="args">Failure text arguments (akin to <see cref="String.Format(string, object[])"/></param>
 public void Fail(RequestValidationIssue issue, string property, string message, params string[] args)
 {
     // Use overload
     this.Fail(issue, property, String.Format(message, args));
 }