Interface IMutationInterceptor
Interceptor for mutation execution. Allows observing and reacting to mutations
at various stages: before execution, after execution, on failure, or when blocked by policy.
Assembly: ModularityKit.Mutator.dll
Syntax
public interface IMutationInterceptor
Properties
|
Edit this page
View Source
Name
Unique name of the interceptor.
Declaration
Property Value
|
Edit this page
View Source
Order
Execution order of the interceptor (lower numbers run first).
Declaration
Property Value
Methods
|
Edit this page
View Source
OnAfterMutationAsync(MutationIntent, MutationContext, object?, object?, ChangeSet, string, CancellationToken)
Called after the mutation has successfully executed.
Declaration
Task OnAfterMutationAsync(MutationIntent intent, MutationContext context, object? oldState, object? newState, ChangeSet changes, string executionId, CancellationToken cancellationToken = default)
Parameters
Returns
|
Edit this page
View Source
OnBeforeMutationAsync(MutationIntent, MutationContext, object, string, CancellationToken)
Called before the mutation is executed.
Declaration
Task OnBeforeMutationAsync(MutationIntent intent, MutationContext context, object state, string executionId, CancellationToken cancellationToken = default)
Parameters
Returns
|
Edit this page
View Source
OnMutationFailedAsync(MutationIntent, MutationContext, object, Exception, string, CancellationToken)
Called when the mutation execution fails with an exception.
Declaration
Task OnMutationFailedAsync(MutationIntent intent, MutationContext context, object state, Exception exception, string executionId, CancellationToken cancellationToken = default)
Parameters
Returns
|
Edit this page
View Source
OnPolicyBlockedAsync(MutationIntent, MutationContext, object, PolicyDecision, string, CancellationToken)
Called when the mutation is blocked by a policy decision.
Declaration
Task OnPolicyBlockedAsync(MutationIntent intent, MutationContext context, object state, PolicyDecision decision, string executionId, CancellationToken cancellationToken = default)
Parameters
Returns