Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Classes | Static Public Member Functions | List of all members
EnumExtensions Class Reference

Classes

class  EnumValueNames
 Static class to hold the caches of names
 

Static Public Member Functions

static String Description (this Enum e)
 Return the Description attribute More...
 
static String displayDescription (this Enum e)
 Get the Localized Enum Description More...
 
static List< String > GetDescriptions< TEnum > (TEnum value)
 Get a list of all the descriptions from an Enum - similar to Enum.GetNames() More...
 
static String ToStringCached (this Enum e)
 Get the ToString value, but cache the result each time More...
 

Member Function Documentation

static String EnumExtensions.Description ( this Enum  e)
inlinestatic

Return the Description attribute

Returns
DescriptionAttribute of the enum (or the enum name if no description)
static String EnumExtensions.displayDescription ( this Enum  e)
inlinestatic

Get the Localized Enum Description

Returns
Localized DescriptionAttribute of the enum (or the enum name if no description)
static List<String> EnumExtensions.GetDescriptions< TEnum > ( TEnum  value)
inlinestatic

Get a list of all the descriptions from an Enum - similar to Enum.GetNames()

Template Parameters
TEnumEnum Type
Parameters
valuean Enum object
Returns
List of Descriptions
Type Constraints
TEnum :struct 
TEnum :IConvertible 
static String EnumExtensions.ToStringCached ( this Enum  e)
inlinestatic

Get the ToString value, but cache the result each time

As the Enum definition cant change this saves us lots of ToString Conversions

Returns
The Name of the value

The documentation for this class was generated from the following file: