logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class RailPath

    Ordered sequence of nodes defining a rail path. A rail path must have at least two nodes to form a valid path.

    Inheritance
    object
    RailPath
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.GameRail.Domain.Entities
    Assembly: Serenity.GameRail.Domain.dll
    Syntax
    public class RailPath

    Constructors

    RailPath(RailId, IEnumerable<RailNodePosition>)

    Creates a new RailPath with the specified identity and nodes.

    Declaration
    public RailPath(RailId id, IEnumerable<RailNodePosition> nodes)
    Parameters
    Type Name Description
    RailId id

    The rail identity.

    IEnumerable<RailNodePosition> nodes

    The ordered sequence of nodes.

    Properties

    Id

    Gets the identity of this rail path.

    Declaration
    public RailId Id { get; }
    Property Value
    Type Description
    RailId

    IsValid

    Gets whether this path is valid (has at least two nodes).

    Declaration
    public bool IsValid { get; }
    Property Value
    Type Description
    bool

    NodeCount

    Gets the number of nodes in the path.

    Declaration
    public int NodeCount { get; }
    Property Value
    Type Description
    int

    Nodes

    Gets a read-only view of the path nodes.

    Declaration
    public IReadOnlyList<RailNodePosition> Nodes { get; }
    Property Value
    Type Description
    IReadOnlyList<RailNodePosition>

    Methods

    GetNode(int)

    Gets the node at the specified index.

    Declaration
    public RailNodePosition GetNode(int index)
    Parameters
    Type Name Description
    int index

    The zero-based index of the node.

    Returns
    Type Description
    RailNodePosition

    The node position at the specified index.

    In this article
    © 2026 Serenity. All Rights Reserved