Example #1
0
 /// <summary>Invoke the rule to validate the data.</summary>
 /// <returns><see langword="true" /> if the data is valid,
 /// <see langword="false" /> if the data are invalid.</returns>
 public bool Invoke(object pTarget)
 {
     if (pTarget == null)
     {
         throw new InvalidOperationException("Target of the RuleMethod is unknown.");
     }
     return(mHandler.Invoke(pTarget, mArgs));
 }
Example #2
0
 /// <summary>
 /// Invokes the rule handler delegate passing the specified target.
 /// </summary>
 /// <param name="target">The target.</param>
 /// <returns><c>True</c> if the invoked validation passes; otherwise <c>false</c>.</returns>
 /// <exception cref="ArgumentNullException">target is null</exception>
 public Boolean Invoke(Object target)
 {
     if (target == null)
     {
         throw new ArgumentNullException(nameof(target));
     }
     return(_ruleHandler.Invoke(target, this.RuleBase));
 }
Example #3
0
 /// <summary>
 /// Invokes the rule to validate the data.
 /// </summary>
 /// <returns>
 /// <see langword="true" /> if the data is valid,
 /// <see langword="false" /> if the data is invalid.
 /// </returns>
 public bool Invoke(object target)
 {
     return(_handler.Invoke(target, _args));
 }
Example #4
0
 public bool Invoke()
 {
     return(_handler.Invoke(_target, _args));
 }
Example #5
0
 /// <summary>
 /// Invokes the specified target.
 /// </summary>
 /// <param name="target">The target.</param>
 /// <returns></returns>
 public Boolean Invoke(Object target)
 {
     return(_ruleHandler.Invoke(target, this.RuleBase));
 }