Ejemplo n.º 1
0
        //
        // One time initialization to supply the information needed to initialize the execution environment.
        //
        public static void InitializeExecutionDomain(ReflectionDomainSetup executionDomainSetup, ExecutionEnvironment executionEnvironment)
        {
            ExecutionDomain executionDomain = new ExecutionDomain(executionDomainSetup, executionEnvironment);

            //@todo: This check has a race window but since this is a private api targeted by the toolchain, perhaps this is not so critical.
            if (s_executionDomain != null)
            {
                throw new InvalidOperationException(); // Multiple Initializes not allowed.
            }
            s_executionDomain = executionDomain;

            ReflectionCoreCallbacks reflectionCallbacks = new ReflectionCoreCallbacksImplementation();

            ReflectionAugments.Initialize(reflectionCallbacks);
            return;
        }
Ejemplo n.º 2
0
 public static void InitializeLibrary()
 {
     RuntimeAugments.Initialize(new ReflectionExecutionDomainCallbacksImplementation());
     ReflectionAugments.Initialize(new ReflectionCoreCallbacksImplementation());
 }