/// <summary> /// Returns true (1) if this object is pointing to the same handle as |that| /// object. /// </summary> /// <remarks> /// See also the original CEF documentation in /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_v8_capi.h">cef/include/capi/cef_v8_capi.h</see>. /// </remarks> public bool IsSame(CfxV8Context that) { return(0 != CfxApi.cfx_v8context_is_same(NativePtr, CfxV8Context.Unwrap(that))); }
/// <summary> /// Execute the function using the specified V8 context. |object| is the /// receiver ('this' object) of the function. If |object| is NULL the specified /// context's global object will be used. |arguments| is the list of arguments /// that will be passed to the function. Returns the function return value on /// success. Returns NULL if this function is called incorrectly or an /// exception is thrown. /// </summary> /// <remarks> /// See also the original CEF documentation in /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_v8_capi.h">cef/include/capi/cef_v8_capi.h</see>. /// </remarks> public CfxV8Value ExecuteFunctionWithContext(CfxV8Context context, CfxV8Value @object, CfxV8Value[] arguments) { int arguments_length; IntPtr[] arguments_ptrs; if (arguments != null) { arguments_length = arguments.Length; arguments_ptrs = new IntPtr[arguments_length]; for (int i = 0; i < arguments_length; ++i) { arguments_ptrs[i] = CfxV8Value.Unwrap(arguments[i]); } } else { arguments_length = 0; arguments_ptrs = null; } PinnedObject arguments_pinned = new PinnedObject(arguments_ptrs); var __retval = CfxApi.cfx_v8value_execute_function_with_context(NativePtr, CfxV8Context.Unwrap(context), CfxV8Value.Unwrap(@object), arguments_length, arguments_pinned.PinnedPtr); arguments_pinned.Free(); return(CfxV8Value.Wrap(__retval)); }