Changeset 2056 for trunk/eraser/Eraser.Manager/Plugins.cs
- Timestamp:
- 5/4/2010 7:22:46 AM (3 years ago)
- File:
-
- 1 edited
-
trunk/eraser/Eraser.Manager/Plugins.cs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/eraser/Eraser.Manager/Plugins.cs
r2050 r2056 143 143 AppDomain.CurrentDomain.ReflectionOnlyAssemblyResolve += ResolveReflectionDependency; 144 144 145 try 146 { 147 //Load all core plugins first 148 foreach (KeyValuePair<string, string> plugin in CorePlugins) 149 { 150 LoadCorePlugin(Path.Combine(PluginsFolder, plugin.Key), plugin.Value); 151 } 152 153 //Then load the rest 154 foreach (string fileName in Directory.GetFiles(PluginsFolder)) 155 { 156 FileInfo file = new FileInfo(fileName); 157 if (file.Extension.Equals(".dll")) 158 try 159 { 160 LoadPlugin(file.FullName); 161 } 162 catch (BadImageFormatException) 163 { 164 } 165 catch (FileLoadException) 166 { 167 } 168 } 169 } 170 finally 171 { 172 AppDomain.CurrentDomain.AssemblyResolve -= AssemblyResolve; 173 AppDomain.CurrentDomain.ReflectionOnlyAssemblyResolve -= ResolveReflectionDependency; 145 //Load all core plugins first 146 foreach (KeyValuePair<string, string> plugin in CorePlugins) 147 { 148 LoadCorePlugin(Path.Combine(PluginsFolder, plugin.Key), plugin.Value); 149 } 150 151 //Then load the rest 152 foreach (string fileName in Directory.GetFiles(PluginsFolder)) 153 { 154 FileInfo file = new FileInfo(fileName); 155 if (file.Extension.Equals(".dll")) 156 try 157 { 158 LoadPlugin(file.FullName); 159 } 160 catch (BadImageFormatException) 161 { 162 } 163 catch (FileLoadException) 164 { 165 } 174 166 } 175 167 }
Note: See TracChangeset
for help on using the changeset viewer.
