/// <summary> /// This eager constructor initializes runtime reflection support. As part of ExecutionEnvironmentImplementation /// initialization it enumerates the modules and registers the ones containing EmbeddedMetadata reflection blobs /// in its _moduleToMetadataReader map. /// </summary> static ReflectionExecution() { // Initialize Reflection.Core's one and only ExecutionDomain. ExecutionEnvironmentImplementation executionEnvironment = new ExecutionEnvironmentImplementation(); ReflectionDomainSetupImplementation setup = new ReflectionDomainSetupImplementation(executionEnvironment); ReflectionCoreExecution.InitializeExecutionDomain(setup, executionEnvironment); // Initialize our two communication with System.Private.CoreLib. ExecutionDomain executionDomain = ReflectionCoreExecution.ExecutionDomain; ReflectionExecutionDomainCallbacksImplementation runtimeCallbacks = new ReflectionExecutionDomainCallbacksImplementation(executionDomain, executionEnvironment); RuntimeAugments.Initialize(runtimeCallbacks); #if !CORERT ReflectionTracingInitializer.Initialize(); #endif DefaultAssemblyNamesForGetType = new String[] { DefaultAssemblyNameForGetType, }; ExecutionEnvironment = executionEnvironment; setup.InstallModuleRegistrationCallbacks(); }
/// <summary> /// This eager constructor initializes runtime reflection support. As part of ExecutionEnvironmentImplementation /// initialization it enumerates the modules and registers the ones containing EmbeddedMetadata reflection blobs /// in its _moduleToMetadataReader map. /// </summary> static ReflectionExecution() { // Initialize Reflection.Core's one and only ExecutionDomain. ExecutionEnvironmentImplementation executionEnvironment = new ExecutionEnvironmentImplementation(); ReflectionDomainSetupImplementation setup = new ReflectionDomainSetupImplementation(executionEnvironment); ReflectionCoreExecution.InitializeExecutionDomain(setup, executionEnvironment); // Initialize our two communication with System.Private.CoreLib. ExecutionDomain executionDomain = ReflectionCoreExecution.ExecutionDomain; ReflectionExecutionDomainCallbacksImplementation runtimeCallbacks = new ReflectionExecutionDomainCallbacksImplementation(executionDomain, executionEnvironment); RuntimeAugments.Initialize(runtimeCallbacks); DefaultAssemblyNamesForGetType = new String[] { AssemblyBinder.DefaultAssemblyNameForGetType, }; ExecutionEnvironment = executionEnvironment; }