Ejemplo n.º 1
0
        public async Task <int> ExecuteRuleAsync(BypassSheet bypassSheet)
        {
            if (bypassSheet.Stamps.Contains(ConditionStampId))
            {
                return(await OnConditionDefaultRule.ExecuteRuleAsync(bypassSheet).ConfigureAwait(false));
            }

            return(await ElseConditionDefaultRule.ExecuteRuleAsync(bypassSheet).ConfigureAwait(false));
        }
Ejemplo n.º 2
0
 public bool Equals(IDepartmentRule other)
 {
     if (other == null || !(other is ConditionDepartmentRule otherRule))
     {
         return(false);
     }
     return(ConditionStampId == otherRule.ConditionStampId &&
            OnConditionDefaultRule.Equals(otherRule.OnConditionDefaultRule) &&
            ElseConditionDefaultRule.Equals(otherRule.ElseConditionDefaultRule));
 }