@@ -87,6 +87,7 @@ private static void CacheTypes(Assembly asm)
87
87
{
88
88
foreach ( var type in asm . TryGetTypes ( ) )
89
89
{
90
+ // Cache namespace if there is one
90
91
if ( ! string . IsNullOrEmpty ( type . Namespace ) && ! uniqueNamespaces . Contains ( type . Namespace ) )
91
92
{
92
93
uniqueNamespaces . Add ( type . Namespace ) ;
@@ -100,16 +101,16 @@ private static void CacheTypes(Assembly asm)
100
101
AllNamespaces . Insert ( i , type . Namespace ) ;
101
102
}
102
103
104
+ // Cache the type. Overwrite type if one exists with the full name
103
105
if ( AllTypes . ContainsKey ( type . FullName ) )
104
106
AllTypes [ type . FullName ] = type ;
105
107
else
106
- {
107
108
AllTypes . Add ( type . FullName , type ) ;
108
- //allTypeNames.Add(type.FullName);
109
- }
110
109
110
+ // Invoke listener
111
111
OnTypeLoaded ? . Invoke ( type ) ;
112
112
113
+ // Check type inheritance cache, add this to any lists it should be in
113
114
foreach ( var key in typeInheritance . Keys )
114
115
{
115
116
try
@@ -154,13 +155,6 @@ public static string ProcessTypeInString(Type type, string theString)
154
155
internal virtual string Internal_ProcessTypeInString ( string theString , Type type )
155
156
=> theString ;
156
157
157
- //// Force loading modules
158
- //public static bool LoadModule(string moduleName)
159
- // => Instance.Internal_LoadModule(moduleName);
160
- //
161
- //internal virtual bool Internal_LoadModule(string moduleName)
162
- // => false;
163
-
164
158
// Singleton finder
165
159
166
160
public static void FindSingleton ( string [ ] possibleNames , Type type , BindingFlags flags , List < object > instances )
0 commit comments