JsCreateContext() 개인적인 메소드

private JsCreateContext ( JavaScriptRuntime runtime, IDebugApplication32 debugSite, JavaScriptContext &newContext ) : JavaScriptErrorCode
runtime JavaScriptRuntime
debugSite IDebugApplication32
newContext JavaScriptContext
리턴 JavaScriptErrorCode
예제 #1
0
        /// <summary>
        /// Creates a script context for running scripts.
        /// </summary>
        /// <remarks>
        /// Each script context has its own global object that is isolated from all other script
        /// contexts.
        /// </remarks>
        /// <returns>The created script context.</returns>
        public JavaScriptContext CreateContext()
        {
            JavaScriptContext reference;

            Native.ThrowIfError(
                Environment.Is64BitProcess
                                        ? Native.JsCreateContext(this, (Native.IDebugApplication64)null, out reference)
                                        : Native.JsCreateContext(this, (Native.IDebugApplication32)null, out reference));
            return(reference);
        }
예제 #2
0
        /// <summary>
        /// Creates a debug script context for running scripts.
        /// </summary>
        /// <remarks>
        /// Each script context has its own global object that is isolated from all other script
        /// contexts.
        /// </remarks>
        /// <param name="debugApplication">The debug application to use.</param>
        /// <returns>The created script context.</returns>
        public JavaScriptContext CreateContext(Native.IDebugApplication32 debugApplication)
        {
            JavaScriptContext reference;

            if (Environment.Is64BitProcess)
            {
                throw new InvalidOperationException();
            }
            Native.ThrowIfError(Native.JsCreateContext(this, debugApplication, out reference));
            return(reference);
        }