Ejemplo n.º 1
0
 /// <summary>
 /// Converts to the name of the constant in the specified enumeration value.
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="value"></param>
 /// <returns></returns>
 public static string ToName <T>(this T value)
     where T : struct, Enum
 => FastEnum.GetName(value);
Ejemplo n.º 2
0
 /// <summary>
 /// Returns an indication whether a constant with a specified value exists in a specified enumeration.
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="value"></param>
 /// <returns></returns>
 public static bool IsDefined <T>(this T value)
     where T : struct, Enum
 => FastEnum.IsDefined(value);
Ejemplo n.º 3
0
 /// <summary>
 /// Converts to the member information of the constant in the specified enumeration value.
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="value"></param>
 /// <returns></returns>
 public static Member <T> ToMember <T>(this T value)
     where T : struct, Enum
 => FastEnum.GetMember(value);