예제 #1
0
        /// <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();
        }
예제 #2
0
        /// <summary>
        /// Eager initialization of 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>
        internal static void Initialize()
        {
            // 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;

#if SUPPORT_JIT
            Internal.Runtime.TypeLoader.MethodExecutionStrategy.GlobalExecutionStrategy = new Internal.Runtime.JitSupport.RyuJitExecutionStrategy();
#endif
        }
예제 #3
0
        /// <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();
        }
예제 #4
0
        /// <summary>
        /// Eager initialization of 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>
        internal static void Initialize()
        {
            // Initialize Reflection.Core's one and only ExecutionDomain.
            var executionEnvironment = new ExecutionEnvironmentImplementation();
            var setup = new ReflectionDomainSetupImplementation();

            ReflectionCoreExecution.InitializeExecutionDomain(setup, executionEnvironment);

            // Initialize our two-way communication with System.Private.CoreLib.
            ExecutionDomain executionDomain  = ReflectionCoreExecution.ExecutionDomain;
            var             runtimeCallbacks = new ReflectionExecutionDomainCallbacksImplementation(executionDomain, executionEnvironment);

            RuntimeAugments.Initialize(runtimeCallbacks);

            ExecutionEnvironment = executionEnvironment;
        }
예제 #5
0
        /// <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;
        }
예제 #6
0
        /// <summary>
        /// Eager initialization of 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>
        internal static void Initialize()
        {
            // 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;
        }