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

    Show / Hide Table of Contents

    Class ChangeSet

    Represents a collection of state changes introduced by a mutation. This is a primary feature of a mutation and not an optional addition.

    Inheritance
    object
    ChangeSet
    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 ChangeSet

    Properties

    | Edit this page View Source

    Changes

    Gets the list of all recorded state changes.

    Declaration
    public IReadOnlyList<StateChange> Changes { get; }
    Property Value
    Type Description
    IReadOnlyList<StateChange>
    | Edit this page View Source

    Checksum

    Optional checksum of the changeset for integrity verification.

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

    Count

    Gets the total number of changes in the set.

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

    Empty

    Returns an empty changeset.

    Declaration
    public static ChangeSet Empty { get; }
    Property Value
    Type Description
    ChangeSet
    | Edit this page View Source

    HasChanges

    Indicates whether there are any recorded changes.

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

    Timestamp

    Timestamp of the changeset creation.

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

    Methods

    | Edit this page View Source

    Add(StateChange)

    Adds a new state change to the changeset.

    Declaration
    public void Add(StateChange change)
    Parameters
    Type Name Description
    StateChange change

    The state change to add.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if change is null.

    | Edit this page View Source

    FromChanges(params StateChange[])

    Creates changeset from multiple state changes.

    Declaration
    public static ChangeSet FromChanges(params StateChange[] changes)
    Parameters
    Type Name Description
    StateChange[] changes

    Array of state changes to include.

    Returns
    Type Description
    ChangeSet

    A ChangeSet containing all provided changes.

    | Edit this page View Source

    GetChangedPaths()

    Retrieves all unique paths that have undergone changes.

    Declaration
    public IEnumerable<string> GetChangedPaths()
    Returns
    Type Description
    IEnumerable<string>

    Enumerable of unique changed paths.

    | Edit this page View Source

    GetChanges(string)

    Retrieves all changes corresponding to a specific path.

    Declaration
    public IEnumerable<StateChange> GetChanges(string path)
    Parameters
    Type Name Description
    string path

    The path to filter changes.

    Returns
    Type Description
    IEnumerable<StateChange>

    Enumerable of StateChange matching the path.

    | Edit this page View Source

    IsChanged(string)

    Determines whether a specific path has been changed.

    Declaration
    public bool IsChanged(string path)
    Parameters
    Type Name Description
    string path

    The path to check.

    Returns
    Type Description
    bool

    True if the path has been changed; otherwise, false.

    | Edit this page View Source

    Single(StateChange)

    Creates changeset containing single state change.

    Declaration
    public static ChangeSet Single(StateChange change)
    Parameters
    Type Name Description
    StateChange change

    The state change to include.

    Returns
    Type Description
    ChangeSet

    A ChangeSet containing the single change.

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