private NKSNKRemotingContext(NKScriptContextRemotingProxy proxy, Dictionary <string, object> options) : base(proxy.NKid)
 {
     _async_queue  = null;
     this._proxy   = proxy;
     proxy.context = this;
     NKLogging.log("+NodeKit Renderer Remoting JavaScript Proxy E" + _id);
 }
        public static Task <NKScriptContext> createContext(NKScriptContextRemotingProxy proxy, Dictionary <string, object> options)
        {
            if (options == null)
            {
                options = new Dictionary <string, object>();
            }

            NKScriptContext context = new NKSNKRemotingContext(proxy, options);

            return(Task.FromResult(context));
        }
        private async Task startNodeKitRenderer(Dictionary<string, object> options)
        {
            string[] args = (string[])options["NKS.Args"];

            NKEventEmitter.isMainProcess = false;

            options.set("NKS.MainThreadScheduler", TaskScheduler.FromCurrentSynchronizationContext());
            options.set("NKS.MainThreadId", Environment.CurrentManagedThreadId);
            options.set("NKS.RemoteProcess", true);

            proxy = NKRemoting.NKRemotingProxy.registerAsClient(args[0]);
            context = await NKScripting.Engines.NKRemoting.NKSNKRemotingContext.createContext(proxy, options);

            // REMOTE SCRIPT ENGINE LOADED, ADD {NK} NODEKIT PROXY
            await NKElectro.Main.addElectroRemoteProxy(context, options);

            proxy.NKready();
        }
        private async Task startNodeKitRenderer(Dictionary <string, object> options)
        {
            string[] args = (string[])options["NKS.Args"];

            NKEventEmitter.isMainProcess = false;

            options.set("NKS.MainThreadScheduler", TaskScheduler.FromCurrentSynchronizationContext());
            options.set("NKS.MainThreadId", Environment.CurrentManagedThreadId);
            options.set("NKS.RemoteProcess", true);

            proxy   = NKRemoting.NKRemotingProxy.registerAsClient(args[0]);
            context = await NKScripting.Engines.NKRemoting.NKSNKRemotingContext.createContext(proxy, options);

            // REMOTE SCRIPT ENGINE LOADED, ADD {NK} NODEKIT PROXY
            await NKElectro.Main.addElectroRemoteProxy(context, options);

            proxy.NKready();
        }