示例#1
0
        /// <summary>
        /// Associates a value with the specified identifier and returns true (1) on
        /// success. Returns false (0) if this function is called incorrectly or an
        /// exception is thrown. For read-only values this function will return true
        /// (1) even though assignment failed.
        /// </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 SetValue(string key, CfxV8Value value, CfxV8PropertyAttribute attribute)
        {
            var key_pinned = new PinnedString(key);
            var __retval   = CfxApi.cfx_v8value_set_value_bykey(NativePtr, key_pinned.Obj.PinnedPtr, key_pinned.Length, CfxV8Value.Unwrap(value), (int)attribute);

            key_pinned.Obj.Free();
            return(0 != __retval);
        }
示例#2
0
        /// <summary>
        /// Registers an identifier and returns true (1) on success. Access to the
        /// identifier will be forwarded to the CfxV8Accessor instance passed to
        /// CfxV8Value.CfxV8ValueCreateObject(). Returns false (0) if this
        /// function is called incorrectly or an exception is thrown. For read-only
        /// values this function will return true (1) even though assignment failed.
        /// </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 SetValue(string key, CfxV8AccessControl settings, CfxV8PropertyAttribute attribute)
        {
            var key_pinned = new PinnedString(key);
            var __retval   = CfxApi.cfx_v8value_set_value_byaccessor(NativePtr, key_pinned.Obj.PinnedPtr, key_pinned.Length, (int)settings, (int)attribute);

            key_pinned.Obj.Free();
            return(0 != __retval);
        }
示例#3
0
        /// <summary>
        /// Registers an identifier and returns true (1) on success. Access to the
        /// identifier will be forwarded to the CfrV8Accessor instance passed to
        /// CfrV8Value.CfrV8ValueCreateObject(). Returns false (0) if this
        /// function is called incorrectly or an exception is thrown. For read-only
        /// values this function will return true (1) even though assignment failed.
        /// </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 SetValue(string key, CfxV8AccessControl settings, CfxV8PropertyAttribute attribute)
        {
            var call = new CfxV8ValueSetValueByAccessorRemoteCall();

            call.@this     = RemotePtr.ptr;
            call.key       = key;
            call.settings  = (int)settings;
            call.attribute = (int)attribute;
            call.RequestExecution(RemotePtr.connection);
            return(call.__retval);
        }
示例#4
0
        /// <summary>
        /// Associates a value with the specified identifier and returns true (1) on
        /// success. Returns false (0) if this function is called incorrectly or an
        /// exception is thrown. For read-only values this function will return true
        /// (1) even though assignment failed.
        /// </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 SetValue(string key, CfrV8Value value, CfxV8PropertyAttribute attribute)
        {
            var call = new CfxV8ValueSetValueByKeyRemoteCall();

            call.@this     = RemotePtr.ptr;
            call.key       = key;
            call.value     = CfrObject.Unwrap(value).ptr;
            call.attribute = (int)attribute;
            call.RequestExecution(RemotePtr.connection);
            return(call.__retval);
        }
示例#5
0
        /// <summary>
        /// Registers an identifier and returns true (1) on success. Access to the
        /// identifier will be forwarded to the CfrV8Accessor instance passed to
        /// CfrV8Value.CfrV8ValueCreateObject(). Returns false (0) if this
        /// function is called incorrectly or an exception is thrown. For read-only
        /// values this function will return true (1) even though assignment failed.
        /// </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 SetValue(string key, CfxV8AccessControl settings, CfxV8PropertyAttribute attribute)
        {
            var call = new CfxV8ValueSetValueByAccessorRenderProcessCall();

            call.self      = CfrObject.Unwrap(this);
            call.key       = key;
            call.settings  = (int)settings;
            call.attribute = (int)attribute;
            call.RequestExecution(this);
            return(call.__retval);
        }
示例#6
0
        /// <summary>
        /// Associates a value with the specified identifier and returns true (1) on
        /// success. Returns false (0) if this function is called incorrectly or an
        /// exception is thrown. For read-only values this function will return true
        /// (1) even though assignment failed.
        /// </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 SetValue(string key, CfrV8Value value, CfxV8PropertyAttribute attribute)
        {
            var call = new CfxV8ValueSetValueByKeyRenderProcessCall();

            call.self      = CfrObject.Unwrap(this);
            call.key       = key;
            call.value     = CfrObject.Unwrap(value);
            call.attribute = (int)attribute;
            call.RequestExecution(this);
            return(call.__retval);
        }
示例#7
0
        /// <summary>
        /// Associates a value with the specified identifier and returns true (1) on
        /// success. Returns false (0) if this function is called incorrectly or an
        /// exception is thrown. For read-only values this function will return true
        /// (1) even though assignment failed.
        /// </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 SetValue(string key, CfrV8Value value, CfxV8PropertyAttribute attribute)
        {
            var connection = RemotePtr.connection;
            var call       = new CfxV8ValueSetValueByKeyRemoteCall();

            call.@this = RemotePtr.ptr;
            call.key   = key;
            if (!CfrObject.CheckConnection(value, connection))
            {
                throw new ArgumentException("Render process connection mismatch.", "value");
            }
            call.value     = CfrObject.Unwrap(value).ptr;
            call.attribute = (int)attribute;
            call.RequestExecution(connection);
            return(call.__retval);
        }