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)); }
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)); }