Search Results for

    Show / Hide Table of Contents

    Class EnumDescriptor

    The EnumDescriptor wraps an Enum item and provides metadata for the item.

    Inheritance
    System.Object
    EnumDescriptor
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: ImageVault.Common.Lib.ComponentModel
    Assembly: ImageVault.Common.dll
    Syntax
    public class EnumDescriptor
    Remarks

    2007-02-28 dan: Created

    Fields

    Empty

    Defines an empty descriptor

    Declaration
    public static readonly EnumDescriptor Empty
    Field Value
    Type Description
    EnumDescriptor

    Properties

    Browsable

    Get/Sets the Browsable of the EnumDescriptor

    Declaration
    public bool Browsable { get; set; }
    Property Value
    Type Description
    System.Boolean

    DefaultValue

    Get/Sets the DefaultValue of the EnumDescriptor

    Declaration
    public string DefaultValue { get; set; }
    Property Value
    Type Description
    System.String

    Description

    Get/Sets the Description of the EnumDescriptor

    Declaration
    public string Description { get; set; }
    Property Value
    Type Description
    System.String

    DisplayName

    Get/Sets the DisplayName of the EnumDescriptor

    Declaration
    public string DisplayName { get; set; }
    Property Value
    Type Description
    System.String

    Enum

    Gets the Enum that the EnumDescriptor describes

    Declaration
    public Enum Enum { get; }
    Property Value
    Type Description
    System.Enum

    Methods

    GetAttribute<TAttribute>()

    Declaration
    public TAttribute GetAttribute<TAttribute>()
        where TAttribute : Attribute
    Returns
    Type Description
    TAttribute
    Type Parameters
    Name Description
    TAttribute

    GetAttributes<TAttribute>()

    Declaration
    public TAttribute[] GetAttributes<TAttribute>()
        where TAttribute : Attribute
    Returns
    Type Description
    TAttribute[]
    Type Parameters
    Name Description
    TAttribute

    Parse(Array)

    Parses an array of enums and returns a list of enum descriptors

    Declaration
    public static IList<EnumDescriptor> Parse(Array enums)
    Parameters
    Type Name Description
    System.Array enums

    The Enum array to parse

    Returns
    Type Description
    System.Collections.Generic.IList<EnumDescriptor>

    The found System.Collections.Generic.IList<T>

    Parse(Enum)

    Parses an enum and returns its descriptor

    Declaration
    public static EnumDescriptor Parse(Enum item)
    Parameters
    Type Name Description
    System.Enum item

    The Enum to parse

    Returns
    Type Description
    EnumDescriptor

    The parsed EnumDescriptor

    Parse(Type)

    Parses a type and returns all descriptors for the enum

    Declaration
    public static IList<EnumDescriptor> Parse(Type type)
    Parameters
    Type Name Description
    System.Type type

    The System.Type of enum to get descriptors for

    Returns
    Type Description
    System.Collections.Generic.IList<EnumDescriptor>

    The found System.Collections.Generic.IList<T>

    Extension Methods

    EnumExtensions.GetNames<TEnum>(TEnum)
    In This Article
    Back to top (c) Meriworks 2002-2022