Table of Contents

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

instance T

The instance to evaluate.

options RuleEvaluationOptions

The evaluation options.

cancellationToken CancellationToken

The cancellation token.

Returns

ValueTask<RuleEvaluationResult>

The evaluation result.

Type Parameters

T

The 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

instance T

The instance to evaluate.

options RuleEvaluationOptions

The evaluation options.

Returns

RuleEvaluationResult

The evaluation result.

Type Parameters

T

The 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

instance T

The instance to evaluate.

ruleSet RuleSetManifest

The rule set to evaluate.

Returns

RuleEvaluationResult

The evaluation result.

Type Parameters

T

The type of the instance to evaluate.