Skip to content
ModularityKit.Mutator ModularityKit.Mutator Docs
  • Home
  • Core
  • Governance
  • Redis
  • API
Search Results for

    Show / Hide Table of Contents

    Class StateChange

    Represents a single change in the state. Tracks old and new values, type, timestamp, priority, and optional metadata.

    Inheritance
    object
    StateChange
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: ModularityKit.Mutator.Abstractions.Changes
    Assembly: ModularityKit.Mutator.dll
    Syntax
    public sealed class StateChange

    Properties

    | Edit this page View Source

    Metadata

    Optional additional metadata related to the change.

    Declaration
    public IReadOnlyDictionary<string, object>? Metadata { get; init; }
    Property Value
    Type Description
    IReadOnlyDictionary<string, object>
    | Edit this page View Source

    NewValue

    Value after the change.

    Declaration
    public object? NewValue { get; }
    Property Value
    Type Description
    object
    | Edit this page View Source

    OldValue

    Value before the change.

    Declaration
    public object? OldValue { get; }
    Property Value
    Type Description
    object
    | Edit this page View Source

    Path

    Path to the changed value (e.g., "Email", "Address.City").

    Declaration
    public string Path { get; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    Priority

    Priority of the change (used for conflict resolution).

    Declaration
    public int Priority { get; init; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    Timestamp

    Timestamp when the change occurred.

    Declaration
    public DateTimeOffset Timestamp { get; init; }
    Property Value
    Type Description
    DateTimeOffset

    Methods

    | Edit this page View Source

    Added(string, object?)

    Creates a StateChange representing an added value.

    Declaration
    public static StateChange Added(string path, object? value)
    Parameters
    Type Name Description
    string path

    Path of the added value.

    object value

    Newly added value.

    Returns
    Type Description
    StateChange

    A StateChange instance.

    | Edit this page View Source

    Modified(string, object?, object?)

    Creates a StateChange representing a modified value.

    Declaration
    public static StateChange Modified(string path, object? oldValue, object? newValue)
    Parameters
    Type Name Description
    string path

    Path of the modified value.

    object oldValue

    Previous value.

    object newValue

    New value.

    Returns
    Type Description
    StateChange

    A StateChange instance.

    | Edit this page View Source

    Removed(string, object?)

    Creates a StateChange representing a removed value.

    Declaration
    public static StateChange Removed(string path, object? oldValue)
    Parameters
    Type Name Description
    string path

    Path of the removed value.

    object oldValue

    Value before removal.

    Returns
    Type Description
    StateChange

    A StateChange instance.

    | Edit this page View Source

    Replaced(string, object?, object?)

    Creates a StateChange representing a replacement (old value replaced by new value).

    Declaration
    public static StateChange Replaced(string path, object? oldValue, object? newValue)
    Parameters
    Type Name Description
    string path

    Path of the replaced value.

    object oldValue

    Previous value.

    object newValue

    New value.

    Returns
    Type Description
    StateChange

    A StateChange instance.

    • Edit this page
    • View Source
    In this article
    ModularityKit.Mutator Generated from XML docs and published from main. Back to top