logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Struct RailSnapshot

    Immutable representation of the current rail movement state at a point in time.

    Implements
    IEquatable<RailSnapshot>
    Inherited Members
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: Serenity.GameRail.Domain.ValueObjects
    Assembly: Serenity.GameRail.Domain.dll
    Syntax
    public readonly struct RailSnapshot : IEquatable<RailSnapshot>

    Constructors

    RailSnapshot(RailId, RailProgress, int)

    Creates a new RailSnapshot.

    Declaration
    public RailSnapshot(RailId railId, RailProgress progress, int nodeCount)
    Parameters
    Type Name Description
    RailId railId

    The rail identity.

    RailProgress progress

    The current progress.

    int nodeCount

    The total number of nodes in the rail path.

    Fields

    NodeCount

    The total number of nodes in the rail path.

    Declaration
    public readonly int NodeCount
    Field Value
    Type Description
    int

    Progress

    The current progress along the rail.

    Declaration
    public readonly RailProgress Progress
    Field Value
    Type Description
    RailProgress

    RailId

    The identity of the rail this snapshot belongs to.

    Declaration
    public readonly RailId RailId
    Field Value
    Type Description
    RailId

    Methods

    Equals(RailSnapshot)

    Declaration
    public bool Equals(RailSnapshot other)
    Parameters
    Type Name Description
    RailSnapshot other
    Returns
    Type Description
    bool

    Equals(object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    bool
    Overrides
    ValueType.Equals(object)

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int
    Overrides
    ValueType.GetHashCode()

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    ValueType.ToString()

    Operators

    operator ==(RailSnapshot, RailSnapshot)

    Declaration
    public static bool operator ==(RailSnapshot left, RailSnapshot right)
    Parameters
    Type Name Description
    RailSnapshot left
    RailSnapshot right
    Returns
    Type Description
    bool

    operator !=(RailSnapshot, RailSnapshot)

    Declaration
    public static bool operator !=(RailSnapshot left, RailSnapshot right)
    Parameters
    Type Name Description
    RailSnapshot left
    RailSnapshot right
    Returns
    Type Description
    bool

    Implements

    IEquatable<T>
    In this article
    © 2026 Serenity. All Rights Reserved