Changeset 2010
- Timestamp:
- 5/1/2010 11:14:15 PM (3 years ago)
- File:
-
- 1 edited
-
trunk/eraser/Eraser.Manager/Plugins.cs (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/eraser/Eraser.Manager/Plugins.cs
r1981 r2010 230 230 //loading policy of the plugin. 231 231 instance.Assembly = Assembly.LoadFrom(filePath); 232 LoadingPolicy policy = LoadingPolicy.None;233 232 { 234 233 object[] attr = instance.Assembly.GetCustomAttributes(typeof(LoadingPolicyAttribute), true); 235 234 if (attr.Length != 0) 236 235 { 237 policy = ((LoadingPolicyAttribute)attr[0]).Policy;236 instance.LoadingPolicy = ((LoadingPolicyAttribute)attr[0]).Policy; 238 237 239 238 //If the loading policy is that the plugin is Core, we need to verify 240 239 //the public key of the assembly. 241 if ( policy == LoadingPolicy.Core &&240 if (instance.LoadingPolicy == LoadingPolicy.Core && 242 241 !reflectAssembly.GetName().GetPublicKey().SequenceEqual( 243 242 Assembly.GetExecutingAssembly().GetName().GetPublicKey())) 244 243 { 245 policy = LoadingPolicy.None;244 instance.LoadingPolicy = LoadingPolicy.None; 246 245 } 247 246 } … … 251 250 252 251 //If the loading policy is such that the plugin is a core plugin, ALWAYS load it. 253 if ( policy == LoadingPolicy.Core)252 if (instance.LoadingPolicy == LoadingPolicy.Core) 254 253 loadPlugin = true; 255 254 … … 260 259 //There's no approval or denial, what is the specified loading policy? 261 260 else 262 loadPlugin = policy != LoadingPolicy.DefaultOff;261 loadPlugin = instance.LoadingPolicy != LoadingPolicy.DefaultOff; 263 262 264 263
Note: See TracChangeset
for help on using the changeset viewer.
