Class MutationIntent
Represents the intent behind a mutation — what change is being made and why.
Inherited Members
Namespace: ModularityKit.Mutator.Abstractions.Intent
Assembly: ModularityKit.Mutator.dll
Syntax
public sealed class MutationIntent
Remarks
MutationIntent encapsulates the purpose, context, and metadata of a mutation operation. It is used by the Mutators framework to classify, audit, and control changes across the system.
Key considerations:
- OperationName identifies the action (e.g., "EnableFeature", "GrantPermission").
- Category groups mutations into domains such as Security, Configuration, or Domain.
- RiskLevel guides review and approval workflows.
- IsReversible indicates whether the mutation can be safely undone.
- EstimatedBlastRadius estimates the potential impact scope.
- Tags and Metadata allow rich classification and tracing.
Properties
| Edit this page View SourceCategory
Category of the mutation (e.g., "Security", "Configuration", "Domain").
Declaration
public string Category { get; init; }
Property Value
| Type | Description |
|---|---|
| string |
CreatedAt
Timestamp of when the mutation intent was created.
Declaration
public DateTimeOffset CreatedAt { get; init; }
Property Value
| Type | Description |
|---|---|
| DateTimeOffset |
Description
Business-level description explaining why this change is being performed.
Declaration
public string? Description { get; init; }
Property Value
| Type | Description |
|---|---|
| string |
EstimatedBlastRadius
Estimated scope of impact (blast radius) of the mutation.
Declaration
public BlastRadius? EstimatedBlastRadius { get; init; }
Property Value
| Type | Description |
|---|---|
| BlastRadius |
IsReversible
Indicates whether the mutation is reversible.
Declaration
public bool IsReversible { get; init; }
Property Value
| Type | Description |
|---|---|
| bool |
Metadata
Additional metadata associated with the mutation.
Declaration
public IReadOnlyDictionary<string, object> Metadata { get; init; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyDictionary<string, object> |
OperationName
Name of the operation being performed (e.g., "EnableFeature", "GrantPermission").
Declaration
public string OperationName { get; init; }
Property Value
| Type | Description |
|---|---|
| string |
RiskLevel
Risk level associated with this mutation.
Declaration
public MutationRiskLevel RiskLevel { get; init; }
Property Value
| Type | Description |
|---|---|
| MutationRiskLevel |
Tags
Classification tags for the mutation.
Declaration
public IReadOnlySet<string> Tags { get; init; }
Property Value
| Type | Description |
|---|---|
| IReadOnlySet<string> |
Methods
| Edit this page View SourceCreate(string, string)
Factory method for creating a MutationIntent with required fields.
Declaration
public static MutationIntent Create(string operationName, string category)
Parameters
| Type | Name | Description |
|---|---|---|
| string | operationName | The name of the mutation operation. |
| string | category | The category of the mutation. |
Returns
| Type | Description |
|---|---|
| MutationIntent | A new instance of MutationIntent. |