コード例 #1
0
 private AssemblyBinderImplementation()
 {
     _scopeGroups = new KeyValuePair <AssemblyNameKey, ScopeDefinitionGroup> [0];
     ModuleList.AddModuleRegistrationCallback(RegisterModule);
 }
コード例 #2
0
 /// <summary>
 /// Install callback that gets called whenever a module gets registered. Unfortunately we cannot do that
 /// in the constructor as the callback gets called immediately for the modules that have
 /// already been registered and at the time AssemblyBinderImplementation is constructed
 /// the reflection execution engine is not yet fully initialized - in particular, AddScopesFromReaderToGroups
 /// calls AssemblyName.FullName which requires ReflectionAugments.ReflectionCoreCallbacks which
 /// are registered in ReflectionCoreExecution after the execution domain gets initialized
 /// and the execution domain initialization requires ReflectionDomainSetup which constructs
 /// the AssemblyBinderImplementation. Sigh.
 /// </summary>
 public void InstallModuleRegistrationCallback()
 {
     ModuleList.AddModuleRegistrationCallback(RegisterModule);
 }