public RemoteDelegate(ScriptEnvironmentSetup setup)
            {
                ScriptDomainManager local_environment;

                NewCreated  = ScriptDomainManager.TryCreateLocal(setup, out local_environment);
                Environment = new RemoteScriptEnvironment(local_environment);
            }
Exemple #2
0
        protected virtual void Initialize()
        {
            // A console application needs just the simple setup.
            // The full setup is potentially expensive as it can involve loading System.Configuration.dll
            ScriptDomainManager manager;

            ScriptDomainManager.TryCreateLocal(out manager);
        }
Exemple #3
0
        public static IScriptEnvironment Create()
        {
            ScriptDomainManager manager;

            if (!ScriptDomainManager.TryCreateLocal(out manager))
            {
                throw new InvalidOperationException("Environment already created in the current AppDomain");
            }

            return(manager.Environment);
        }