logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class HudValueClassifier

    Maps a CLR type onto the engine-agnostic HudValueKind the representation rules are written against, so those rules stay testable without touching reflection.

    Inheritance
    object
    HudValueClassifier
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.GameUi.Application.Binding
    Assembly: Serenity.GameUi.Application.dll
    Syntax
    public static class HudValueClassifier

    Methods

    Classify(Type)

    Classifies a bound member's type.

    Declaration
    public static HudValueKind Classify(Type type)
    Parameters
    Type Name Description
    Type type

    The member's type; null classifies as unknown.

    Returns
    Type Description
    HudValueKind

    The value kind a representation can be chosen for.

    IsNumeric(HudValueKind)

    Whether a value of this kind can be rendered as a number.

    Declaration
    public static bool IsNumeric(HudValueKind valueKind)
    Parameters
    Type Name Description
    HudValueKind valueKind

    The classification to check.

    Returns
    Type Description
    bool

    TryConvertToDouble(object, out double)

    Converts a bound value to the double the numeric and time representations render. Returns false for anything that is not a number, so the caller can fall back to text.

    Declaration
    public static bool TryConvertToDouble(object value, out double number)
    Parameters
    Type Name Description
    object value

    The value read from the binding.

    double number

    The numeric value, when one could be produced.

    Returns
    Type Description
    bool

    True when the value is numeric.

    In this article
    © 2026 Serenity. All Rights Reserved