Interface IDomainEngine
- Namespace
- JD.Domain.Abstractions
- Assembly
- JD.Domain.Abstractions.dll
Defines the contract for evaluating domain rules against instances.
public interface IDomainEngine
Methods
EvaluateAsync<T>(T, RuleEvaluationOptions?, CancellationToken)
Evaluates domain rules against the specified instance asynchronously.
ValueTask<RuleEvaluationResult> EvaluateAsync<T>(T instance, RuleEvaluationOptions? options = null, CancellationToken cancellationToken = default) where T : class
Parameters
instanceTThe instance to evaluate.
optionsRuleEvaluationOptionsThe evaluation options.
cancellationTokenCancellationTokenThe cancellation token.
Returns
- ValueTask<RuleEvaluationResult>
The evaluation result.
Type Parameters
TThe type of the instance to evaluate.
Evaluate<T>(T, RuleEvaluationOptions?)
Evaluates domain rules against the specified instance synchronously.
RuleEvaluationResult Evaluate<T>(T instance, RuleEvaluationOptions? options = null) where T : class
Parameters
instanceTThe instance to evaluate.
optionsRuleEvaluationOptionsThe evaluation options.
Returns
- RuleEvaluationResult
The evaluation result.
Type Parameters
TThe type of the instance to evaluate.
Evaluate<T>(T, RuleSetManifest)
Evaluates the specified rule set against the instance.
RuleEvaluationResult Evaluate<T>(T instance, RuleSetManifest ruleSet) where T : class
Parameters
instanceTThe instance to evaluate.
ruleSetRuleSetManifestThe rule set to evaluate.
Returns
- RuleEvaluationResult
The evaluation result.
Type Parameters
TThe type of the instance to evaluate.