Esempio n. 1
0
        private void InitializeJS()
        {
            this.AssertRunningOnThisThread();

            Javascript = new JavascriptEngine();
            Javascript.Script.console = new
            {
                log = new Action <object>(ScriptLog)
            };
            O = new OClass(this);
#pragma warning disable CC0021 // Use nameof
            Javascript.AddObject("O", O);
#pragma warning restore CC0021 // Use nameof
            O.Init();
            if (Resources != null)
            {
                Javascript.Execute(Resources.ReadEntryPoint());
            }
            ((ManualResetEvent)EngineInitialized).Set();
        }