Beispiel #1
0
 internal BrokenRule(IAsyncRuleMethod asyncRule, AsyncRuleResult result)
 {
     _ruleName    = asyncRule.RuleName;
     _description = result.Description;
     _severity    = result.Severity;
     _property    = asyncRule.AsyncRuleArgs.Properties[0].Name;
 }
 /// <summary>
 /// Creates an instance of the object.
 /// </summary>
 /// <param name="propertyValues">
 /// Dictionary containing copies of the business object
 /// property values for the properties associated with this rule.
 /// </param>
 /// <param name="inargs">
 /// Input arguments for use by the rule method.
 /// </param>
 /// <param name="outargs">
 /// Default output arguments that can be changed by the rule
 /// method.
 /// </param>
 /// <param name="result">
 /// Async result handler for the async callback on completion
 /// of the rule.
 /// </param>
 public AsyncValidationRuleContext(Dictionary <string, object> propertyValues, AsyncRuleArgs inargs, AsyncRuleResult outargs, AsyncRuleResultHandler result)
 {
     _propertyValues = propertyValues;
     _inargs         = inargs;
     _outargs        = outargs;
     _result         = result;
 }
        internal void Add(IAsyncRuleMethod rule, AsyncRuleResult result)
        {
            Remove(rule);
            IsReadOnly = false;
            BrokenRule item = new BrokenRule(rule, result);

            IncrementCount(item);
            Add(item);
            IsReadOnly = true;
        }