1using System.Reflection;
63 AppDomain.CurrentDomain.AssemblyLoad += delegate {
71 string text = assembly.FullName.ToLower();
72 if (text.Contains(
"b77a5c561934e089")) {
75 if (text.Contains(
"31bf3856ad364e35")) {
78 if (text.Contains(
"b03f5f7f11d50a3a")) {
81 if (text.Contains(
"89845dcd8080cc91")) {
84 return text.Contains(
"opentk") || text.Contains(
"sharpdx");
87 public static Type
FindType(
string typeName,
bool skipSystemAssemblies,
bool throwIfNotFound) {
92 if (!skipSystemAssemblies
94#pragma warning disable IL2026
95 value = loadedAssembly.GetType(longTypeName);
96#pragma warning restore IL2026
103 return throwIfNotFound
104 ?
throw new InvalidOperationException($
"Type \"{longTypeName}\" not found in any loaded assembly.")
114 m_longToShort.TryGetValue(longTypeName, out
string value) ? value : longTypeName;
117 m_shortToLong.TryGetValue(shortTypeName, out
string value) ? value : shortTypeName;
static bool IsKnownSystemAssembly(Assembly assembly)
static List< Assembly > m_loadedAssemblies
static void AddShortTypeName(string shortTypeName, string longTypeName)
static Type FindType(string typeName, bool skipSystemAssemblies, bool throwIfNotFound)
static Dictionary< string, string > m_shortToLong
static Dictionary< string, Type > m_typesByName
static Dictionary< string, string > m_longToShort
static string GetLongTypeName(string shortTypeName)
static ReadOnlyList< Assembly > LoadedAssemblies
static bool m_rescanAssemblies
static string GetShortTypeName(string longTypeName)