Example #1
0
        /// <summary>
        /// Sets the value at the specified index. Returns true (1) if the value was
        /// set successfully. If |value| represents simple data then the underlying
        /// data will be copied and modifications to |value| will not modify this
        /// object. If |value| represents complex data (binary, dictionary or list)
        /// then the underlying data will be referenced and modifications to |value|
        /// will modify this object.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_values_capi.h">cef/include/capi/cef_values_capi.h</see>.
        /// </remarks>
        public bool SetValue(ulong index, CfrValue value)
        {
            var call = new CfxListValueSetValueRemoteCall();

            call.@this = RemotePtr.ptr;
            call.index = index;
            call.value = CfrObject.Unwrap(value).ptr;
            call.RequestExecution(RemotePtr.connection);
            return(call.__retval);
        }
Example #2
0
        /// <summary>
        /// Sets the value at the specified index. Returns true (1) if the value was
        /// set successfully. If |value| represents simple data then the underlying
        /// data will be copied and modifications to |value| will not modify this
        /// object. If |value| represents complex data (binary, dictionary or list)
        /// then the underlying data will be referenced and modifications to |value|
        /// will modify this object.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_values_capi.h">cef/include/capi/cef_values_capi.h</see>.
        /// </remarks>
        public bool SetValue(ulong index, CfrValue value)
        {
            var connection = RemotePtr.connection;
            var call       = new CfxListValueSetValueRemoteCall();

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