Example #1
0
        /// <summary>
        /// The post data element will represent bytes.  The bytes passed in will be
        /// copied.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_request_capi.h">cef/include/capi/cef_request_capi.h</see>.
        /// </remarks>
        public void SetToBytes(ulong size, RemotePtr bytes)
        {
            var call = new CfxPostDataElementSetToBytesRemoteCall();

            call.@this = RemotePtr.ptr;
            call.size  = size;
            call.bytes = bytes.ptr;
            call.RequestExecution(RemotePtr.connection);
        }
        /// <summary>
        /// The post data element will represent bytes.  The bytes passed in will be
        /// copied.
        /// </summary>
        /// <remarks>
        /// See also the original CEF documentation in
        /// <see href="https://bitbucket.org/chromiumfx/chromiumfx/src/tip/cef/include/capi/cef_request_capi.h">cef/include/capi/cef_request_capi.h</see>.
        /// </remarks>
        public void SetToBytes(ulong size, RemotePtr bytes)
        {
            var connection = RemotePtr.connection;
            var call       = new CfxPostDataElementSetToBytesRemoteCall();

            call.@this = RemotePtr.ptr;
            call.size  = size;
            if (bytes.connection != connection)
            {
                throw new ArgumentException("Render process connection mismatch.", "bytes");
            }
            call.bytes = bytes.ptr;
            call.RequestExecution(connection);
        }