logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Struct HittableId

    Stable identifier for a hittable world object. Immutable value object that supports equality comparison and hashing.

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

    Constructors

    HittableId(string)

    Creates a new HittableId with the specified identifier.

    Declaration
    public HittableId(string value)
    Parameters
    Type Name Description
    string value

    The unique string identifier. Cannot be null.

    Fields

    Value

    The unique string identifier for this hittable.

    Declaration
    public readonly string Value
    Field Value
    Type Description
    string

    Properties

    IsValid

    Checks if this HittableId has a valid, non-empty value.

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

    Methods

    Equals(HittableId)

    Declaration
    public bool Equals(HittableId other)
    Parameters
    Type Name Description
    HittableId 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 ==(HittableId, HittableId)

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

    explicit operator HittableId(string)

    Declaration
    public static explicit operator HittableId(string value)
    Parameters
    Type Name Description
    string value
    Returns
    Type Description
    HittableId

    implicit operator string(HittableId)

    Declaration
    public static implicit operator string(HittableId id)
    Parameters
    Type Name Description
    HittableId id
    Returns
    Type Description
    string

    operator !=(HittableId, HittableId)

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

    Implements

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