Search Results for

    Show / Hide Table of Contents

    Class EnumCache

    Helper class for quicker enum type queries. The result obtained from reflection is cached locally making subsequent queries faster.

    Inheritance
    object
    EnumCache
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: LobsterFramework
    Assembly: LobsterFramework.dll
    Syntax
    public static class EnumCache

    Methods

    | Improve this Doc View Source

    GetNames(Type)

    Finds the names of an enum type

    Declaration
    public static ReadOnlyCollection<string> GetNames(Type type)
    Parameters
    Type Name Description
    Type type
    Returns
    Type Description
    ReadOnlyCollection<string>

    A collection of names of the enum entries, null if the argument is not an enum type

    | Improve this Doc View Source

    GetNames<T>()

    Finds the names of an enum type

    Declaration
    public static ReadOnlyCollection<string> GetNames<T>() where T : Enum
    Returns
    Type Description
    ReadOnlyCollection<string>

    A collection of names of the enum entries

    Type Parameters
    Name Description
    T

    The enum type to be inspected

    | Improve this Doc View Source

    GetSize(Type)

    Finds the number of entries for the given enum type

    Declaration
    public static int GetSize(Type type)
    Parameters
    Type Name Description
    Type type
    Returns
    Type Description
    int

    The number of entries of the enum type, 0 if the type is not an enum type

    | Improve this Doc View Source

    GetSize<T>()

    Finds the number of entries for the given enum type

    Declaration
    public static int GetSize<T>() where T : Enum
    Returns
    Type Description
    int
    Type Parameters
    Name Description
    T

    The enum type to be inspected

    • Improve this Doc
    • View Source
    In This Article
    Back to top LobsterFramework documentation