Class MutationEngineOptions
Configuration options controlling the behavior of the mutation engine.
Inherited Members
Namespace: ModularityKit.Mutator.Abstractions
Assembly: ModularityKit.Mutator.dll
Syntax
public sealed class MutationEngineOptions
Remarks
MutationEngineOptions defines execution semantics such as validation strategy, timeout handling, batching behavior, and performance characteristics.
These options are typically configured once per engine instance and treated as immutable during execution.
Properties
| Edit this page View SourceAlwaysValidate
Determines whether mutations should always be validated, even when executed in Commit mode.
Declaration
public bool AlwaysValidate { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Remarks
When enabled, all validation rules are enforced regardless of execution mode. Disabling this may improve performance but can allow invalid mutations to execute.
Default
Default engine configuration with balanced safety and performance.
Declaration
public static MutationEngineOptions Default { get; }
Property Value
| Type | Description |
|---|---|
| MutationEngineOptions |
EnableDetailedMetrics
Enables collection of detailed execution metrics.
Declaration
public bool EnableDetailedMetrics { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Remarks
Detailed metrics provide deep observability but may have measurable performance impact in high-throughput scenarios.
ExecutionTimeout
The maximum allowed execution time for a single mutation.
Declaration
public TimeSpan? ExecutionTimeout { get; set; }
Property Value
| Type | Description |
|---|---|
| TimeSpan? |
Remarks
When specified, exceeding this duration results in an ExecutionTimeoutException.
MaxConcurrentMutations
The maximum number of mutations that may be executed concurrently by the core runtime.
Declaration
public int MaxConcurrentMutations { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Remarks
This setting limits concurrent core execution across the engine. Mutations that carry the same StateId are serialized so shared-state workloads remain deterministic. Batch execution remains ordered; the limit applies to each batch step as it passes through the runtime.
Performance
Performance oriented configuration minimizing overhead.
Declaration
public static MutationEngineOptions Performance { get; }
Property Value
| Type | Description |
|---|---|
| MutationEngineOptions |
Remarks
Intended for trusted environments where validation and detailed metrics can be safely reduced.
PolicyEvaluationTimeout
The maximum allowed evaluation time for a single policy.
Declaration
public TimeSpan? PolicyEvaluationTimeout { get; set; }
Property Value
| Type | Description |
|---|---|
| TimeSpan? |
Remarks
When specified, each registered policy evaluation gets its own timeout window. This is primarily intended for async policies that call external identity, ticketing, quota, or compliance systems.
StopBatchOnFirstFailure
Indicates whether batch execution should stop after the first failure.
Declaration
public bool StopBatchOnFirstFailure { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Remarks
When enabled, subsequent mutations in the batch will not be executed once a failure occurs.
Strict
Strict configuration emphasizing correctness, validation, and observability.
Declaration
public static MutationEngineOptions Strict { get; }
Property Value
| Type | Description |
|---|---|
| MutationEngineOptions |