-
Notifications
You must be signed in to change notification settings - Fork 7
Skip Rules
Arif Yayalar (@ayayalar) edited this page Aug 24, 2018
·
1 revision
Marks the rule to be skipped.
Must be set in Initialize , or InitializeAsync method. |
class IsValidAmount : Rule<Order>
{
public override IRuleResult Invoke()
{
if (Model.Amount <= 0.0m) throw new InvalidOperationException();
return null;
}
// Skip this rule
public override void Initialize() => Configuration.Skip = true;
}
Synchronous Rules |
Asynchronous Rules |
Parallel Rules |
Reactive Rules |
Proactive Rules |
ExceptionHandler Rules |