Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
System.Enum Class Referenceabstract

Classes

class  EnumInfo
 

Public Member Functions

override bool Equals ([NotNullWhen(true)] object? obj)
 
bool HasFlag (Enum flag)
 
override int GetHashCode ()
 
override string ToString ()
 
int CompareTo (object? target)
 
string ToString (string? format, IFormatProvider? provider)
 
string ToString (string? format)
 
string ToString (IFormatProvider? provider)
 
TypeCode GetTypeCode ()
 
int CompareTo (T? other)
 
bool ToBoolean (IFormatProvider? provider)
 
char ToChar (IFormatProvider? provider)
 
sbyte ToSByte (IFormatProvider? provider)
 
byte ToByte (IFormatProvider? provider)
 
short ToInt16 (IFormatProvider? provider)
 
ushort ToUInt16 (IFormatProvider? provider)
 
int ToInt32 (IFormatProvider? provider)
 
uint ToUInt32 (IFormatProvider? provider)
 
long ToInt64 (IFormatProvider? provider)
 
ulong ToUInt64 (IFormatProvider? provider)
 
float ToSingle (IFormatProvider? provider)
 
double ToDouble (IFormatProvider? provider)
 
decimal ToDecimal (IFormatProvider? provider)
 
DateTime ToDateTime (IFormatProvider? provider)
 
object ToType (Type conversionType, IFormatProvider? provider)
 

Static Public Member Functions

static ? string GetName< TEnum > (TEnum value)
 
static ? string GetName (Type enumType, object value)
 
static string[] GetNames< TEnum > ()
 
static string[] GetNames (Type enumType)
 
static Type GetUnderlyingType (Type enumType)
 
static TEnum[] GetValues< TEnum > ()
 
static Array GetValues (Type enumType)
 
static bool IsDefined< TEnum > (TEnum value)
 
static bool IsDefined (Type enumType, object value)
 
static object Parse (Type enumType, string value)
 
static object Parse (Type enumType, ReadOnlySpan< char > value)
 
static object Parse (Type enumType, string value, bool ignoreCase)
 
static object Parse (Type enumType, ReadOnlySpan< char > value, bool ignoreCase)
 
static TEnum Parse< TEnum > (string value)
 
static TEnum Parse< TEnum > (ReadOnlySpan< char > value)
 
static TEnum Parse< TEnum > (string value, bool ignoreCase)
 
static TEnum Parse< TEnum > (ReadOnlySpan< char > value, bool ignoreCase)
 
static bool TryParse (Type enumType, string? value, out object? result)
 
static bool TryParse (Type enumType, ReadOnlySpan< char > value, out object? result)
 
static bool TryParse (Type enumType, string? value, bool ignoreCase, out object? result)
 
static bool TryParse (Type enumType, ReadOnlySpan< char > value, bool ignoreCase, out object? result)
 
static bool TryParse< TEnum > ([NotNullWhen(true)] string? value, out TEnum result)
 
static bool TryParse< TEnum > (ReadOnlySpan< char > value, out TEnum result)
 
static bool TryParse< TEnum > ([NotNullWhen(true)] string? value, bool ignoreCase, out TEnum result)
 
static bool TryParse< TEnum > (ReadOnlySpan< char > value, bool ignoreCase, out TEnum result)
 
static object ToObject (Type enumType, object value)
 
static string Format (Type enumType, object value, string format)
 
static object ToObject (Type enumType, sbyte value)
 
static object ToObject (Type enumType, short value)
 
static object ToObject (Type enumType, int value)
 
static object ToObject (Type enumType, byte value)
 
static object ToObject (Type enumType, ushort value)
 
static object ToObject (Type enumType, uint value)
 
static object ToObject (Type enumType, long value)
 
static object ToObject (Type enumType, ulong value)
 

Package Functions

static RuntimeType InternalGetUnderlyingType (RuntimeType enumType)
 
object GetValue ()
 
static int GetHashCodeOfPtr (IntPtr ptr)
 

Static Package Functions

static string GetEnumName (RuntimeType enumType, ulong ulValue)
 
static ulong ToUInt64 (object value)
 
static string[] InternalGetNames (RuntimeType enumType)
 
static ulong[] InternalGetValues (RuntimeType enumType)
 

Private Member Functions

static void GetEnumValuesAndNames (QCallTypeHandle enumType, ObjectHandleOnStack values, ObjectHandleOnStack names, Interop.BOOL getNames)
 
static object InternalBoxEnum (RuntimeType enumType, long value)
 
CorElementType InternalGetCorElementType ()
 
bool InternalHasFlag (Enum flags)
 
string ValueToString ()
 
string ValueToHexString ()
 
ulong ToUInt64 ()
 
bool IConvertible. ToBoolean (IFormatProvider provider)
 
char IConvertible. ToChar (IFormatProvider provider)
 
sbyte IConvertible. ToSByte (IFormatProvider provider)
 
byte IConvertible. ToByte (IFormatProvider provider)
 
short IConvertible. ToInt16 (IFormatProvider provider)
 
ushort IConvertible. ToUInt16 (IFormatProvider provider)
 
int IConvertible. ToInt32 (IFormatProvider provider)
 
uint IConvertible. ToUInt32 (IFormatProvider provider)
 
long IConvertible. ToInt64 (IFormatProvider provider)
 
ulong IConvertible. ToUInt64 (IFormatProvider provider)
 
float IConvertible. ToSingle (IFormatProvider provider)
 
double IConvertible. ToDouble (IFormatProvider provider)
 
decimal IConvertible. ToDecimal (IFormatProvider provider)
 
DateTime IConvertible. ToDateTime (IFormatProvider provider)
 
object IConvertible. ToType (Type type, IFormatProvider provider)
 
static bool CanCompareBits (object obj)
 
static bool FastEqualsCheck (object a, object b)
 

Static Private Member Functions

static EnumInfo GetEnumInfo (RuntimeType enumType, bool getNames=true)
 
static string ValueToHexString (object value)
 
static string GetEnumName (EnumInfo enumInfo, ulong ulValue)
 
static string InternalFormat (RuntimeType enumType, ulong value)
 
static string InternalFlagsFormat (RuntimeType enumType, ulong result)
 
static string InternalFlagsFormat (EnumInfo enumInfo, ulong resultValue)
 
static ulong ToUInt64< TEnum > (TEnum value)
 
static bool TryParse (Type enumType, string value, bool ignoreCase, bool throwOnFailure, out object result)
 
static bool TryParse (Type enumType, ReadOnlySpan< char > value, bool ignoreCase, bool throwOnFailure, out object result)
 
static bool TryParse< TEnum > (string value, bool ignoreCase, bool throwOnFailure, out TEnum result)
 
static bool TryParse< TEnum > (ReadOnlySpan< char > value, bool ignoreCase, bool throwOnFailure, out TEnum result)
 
static bool TryParseInt32Enum (RuntimeType enumType, ReadOnlySpan< char > value, int minInclusive, int maxInclusive, bool ignoreCase, bool throwOnFailure, TypeCode type, out int result)
 
static bool TryParseUInt32Enum (RuntimeType enumType, ReadOnlySpan< char > value, uint maxInclusive, bool ignoreCase, bool throwOnFailure, TypeCode type, out uint result)
 
static bool TryParseInt64Enum (RuntimeType enumType, ReadOnlySpan< char > value, bool ignoreCase, bool throwOnFailure, out long result)
 
static bool TryParseUInt64Enum (RuntimeType enumType, ReadOnlySpan< char > value, bool ignoreCase, bool throwOnFailure, out ulong result)
 
static bool TryParseRareEnum (RuntimeType enumType, ReadOnlySpan< char > value, bool ignoreCase, bool throwOnFailure, [NotNullWhen(true)] out object result)
 
static bool TryParseByName (RuntimeType enumType, ReadOnlySpan< char > value, bool ignoreCase, bool throwOnFailure, out ulong result)
 
static bool StartsNumber (char c)
 
static object ToObject (Type enumType, char value)
 
static object ToObject (Type enumType, bool value)
 
static RuntimeType ValidateRuntimeType (Type enumType)
 

Static Private Attributes

const char EnumSeparatorChar = ','
 

Detailed Description

Definition at line 13 of file Enum.cs.


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