Megadocs 0.0.1
All of megapop's internal libraries
Megapop.MegaCore.EnumExt Class Reference

Static Public Member Functions

static bool HasAnyFlag (this Enum variable, params Enum[] flags)
 
static bool HasAllFlags< T > (this T value, T flags)
 
static bool HasFlag< T > (this T value, T flag)
 
static T SetFlag< T > (this Enum value, T flagToAppend)
 
static T ClearFlag< T > (this Enum value, T flagToRemove)
 
static T ToggleFlag< T > (this Enum value, T flagToToggle)
 Toggle a flag More...
 
static T Set< T > (this Enum value, T flagToChange, bool onOff)
 Sets a flag More...
 

Member Function Documentation

◆ ClearFlag< T >()

static T Megapop.MegaCore.EnumExt.ClearFlag< T > ( this Enum  value,
flagToRemove 
)
inlinestatic
Type Constraints
T :Enum 

◆ HasAllFlags< T >()

static bool Megapop.MegaCore.EnumExt.HasAllFlags< T > ( this T  value,
flags 
)
inlinestatic
Type Constraints
T :Enum 

◆ HasAnyFlag()

static bool Megapop.MegaCore.EnumExt.HasAnyFlag ( this Enum  variable,
params Enum[]  flags 
)
inlinestatic

◆ HasFlag< T >()

static bool Megapop.MegaCore.EnumExt.HasFlag< T > ( this T  value,
flag 
)
inlinestatic
Type Constraints
T :Enum 

◆ Set< T >()

static T Megapop.MegaCore.EnumExt.Set< T > ( this Enum  value,
flagToChange,
bool  onOff 
)
inlinestatic

Sets a flag

◆ SetFlag< T >()

static T Megapop.MegaCore.EnumExt.SetFlag< T > ( this Enum  value,
flagToAppend 
)
inlinestatic
Type Constraints
T :Enum 

◆ ToggleFlag< T >()

static T Megapop.MegaCore.EnumExt.ToggleFlag< T > ( this Enum  value,
flagToToggle 
)
inlinestatic

Toggle a flag

Type Constraints
T :Enum 

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