コード例 #1
0
 /// <summary>
 /// Sets the user data for this object and returns true on success. Returns
 /// false if this method is called incorrectly. This method can only be called
 /// on user created objects.
 /// </summary>
 public bool SetUserData(CefUserData userData)
 {
     ThrowIfObjectIsInvalid();
     return(cef_v8value_t.invoke_set_user_data(
                this.ptr,
                (cef_base_t *)userData.GetNativePointerAndAddRef()
                ) != 0);
 }
コード例 #2
0
        /// <summary>
        /// Returns the user data, if any, specified when the object was created.
        /// </summary>
        public CefUserData GetUserData()
        {
            ThrowIfObjectIsInvalid();
            var n_base = cef_v8value_t.invoke_get_user_data(this.ptr);

            if (n_base == null)
            {
                return(null);
            }
            return(CefUserData.FromOrDefault((cefglue_userdata_t *)n_base));
        }
コード例 #3
0
 /// <summary>
 /// Sets the user data for this object and returns true on success. Returns
 /// false if this method is called incorrectly. This method can only be called
 /// on user created objects.
 /// </summary>
 public bool SetUserData(CefUserData userData)
 {
     ThrowIfObjectIsInvalid();
     return cef_v8value_t.invoke_set_user_data(
         this.ptr,
         (cef_base_t*)userData.GetNativePointerAndAddRef()
     ) != 0;
 }