Class ValidationWarning
Represents a validation warning encountered during mutation or state validation. Warnings indicate potential issues that do not block execution but may require attention.
Inherited Members
Namespace: ModularityKit.Mutator.Abstractions.Results
Assembly: ModularityKit.Mutator.dll
Syntax
public sealed class ValidationWarning
Remarks
Constructs a new ValidationWarning instance.
Constructors
| Edit this page View SourceValidationWarning(string, string, string?)
Represents a validation warning encountered during mutation or state validation. Warnings indicate potential issues that do not block execution but may require attention.
Declaration
public ValidationWarning(string path, string message, string? code = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | path | Path to the property or field causing the warning. |
| string | message | Description of the warning. |
| string | code | Optional code for categorization or localization. |
Remarks
Constructs a new ValidationWarning instance.
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown if |
Properties
| Edit this page View SourceCode
Optional code for categorization, tracking, or localization (i18n).
Declaration
public string? Code { get; }
Property Value
| Type | Description |
|---|---|
| string |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown if |
Message
Human-readable description of the warning. Should clearly explain the potential issue or caution.
Declaration
public string Message { get; }
Property Value
| Type | Description |
|---|---|
| string |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown if |
Path
Path to the property or field that triggered the warning. Examples: "Email", "Address.City", "Wallet.Owners[0].Role".
Declaration
public string Path { get; }
Property Value
| Type | Description |
|---|---|
| string |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown if |
Methods
| Edit this page View SourceToString()
Returns a string representation of the warning, including severity tag, path, and message.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | A human-readable string describing the warning. |
Overrides
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown if |