9internal class ReflectionUtility
12 private static readonly SortedDictionary<string, Type> AllTypes =
new(StringComparer.OrdinalIgnoreCase);
14 internal static void Initialize()
19 internal static Type GetTypeByName(
string fullName)
21 AllTypes.TryGetValue(fullName, out Type type);
24 type = Type.GetType(fullName);
29 private static void SetupTypeCache()
31 foreach (Assembly
asm in AppDomain.CurrentDomain.GetAssemblies())
37 private static void CacheTypes(Assembly
asm)
39 Type[] asmTypes =
null;
42 asmTypes =
asm.GetTypes();
51 foreach (Type type
in asmTypes)
54 AllTypes[type.FullName] = type;