static internal IntPtr Unwrap(CfxBaseRefCounted cfxBase) { if (cfxBase == null) { return(IntPtr.Zero); } else { return(cfxBase.NativePtr); } }
/// <summary> /// Always acquire a lock on this weak cache before calling this method. /// </summary> internal void Add(CfxBaseRefCounted obj) { // always locked by caller cache.Add(obj.nativePtrUnchecked, new WeakReference(obj, false)); }
/// <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(CfxBaseRefCounted userData) { return(0 != CfxApi.V8Value.cfx_v8value_set_user_data(NativePtr, CfxBaseRefCounted.Unwrap(userData))); }