예제 #1
0
 public static void RegisterAlternate(Type type, AlternateEnumRegister del)
 {
     if (!type.IsEnum)
     {
         throw new Exception($"The given type isn't an enum ({type.FullName} isn't an Enum)");
     }
     BANNED_ENUMS.Add(type, del);
 }
예제 #2
0
 internal static void RegisterAlternate(Type type, AlternateEnumRegister del)
 {
     BANNED_ENUMS.Add(type, del);
 }
예제 #3
0
 public static void RegisterAlternate <TEnum>(AlternateEnumRegister del) where TEnum : Enum => RegisterAlternate(typeof(TEnum), del);
예제 #4
0
 public static void RegisterAlternate <T>(AlternateEnumRegister del) => RegisterAlternate(typeof(T), del);