Пример #1
0
        /// <summary>
        /// Sets the user data for this object and returns true (1) on success. Returns
        /// false (0) if this function is called incorrectly. This function can only be
        /// called on user created objects.
        /// </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 SetUserData(RemotePtr userData)
        {
            var call = new CfxV8ValueSetUserDataRemoteCall();

            call.@this    = RemotePtr.ptr;
            call.userData = userData.ptr;
            call.RequestExecution(RemotePtr.connection);
            return(call.__retval);
        }
Пример #2
0
        /// <summary>
        /// Sets the user data for this object and returns true (1) on success. Returns
        /// false (0) if this function is called incorrectly. This function can only be
        /// called on user created objects.
        /// </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 SetUserData(CfrBaseRefCounted userData)
        {
            var connection = RemotePtr.connection;
            var call       = new CfxV8ValueSetUserDataRemoteCall();

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