/// <summary> /// Sets the value at the specified key as type list. Returns true (1) if the /// value was set successfully. If |value| is currently owned by another object /// then the value will be copied and the |value| reference will not change. /// Otherwise, ownership will be transferred to this object and the |value| /// reference will be invalidated. /// </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 SetList(string key, CfxListValue value) { var key_pinned = new PinnedString(key); var __retval = CfxApi.DictionaryValue.cfx_dictionary_value_set_list(NativePtr, key_pinned.Obj.PinnedPtr, key_pinned.Length, CfxListValue.Unwrap(value)); key_pinned.Obj.Free(); return(0 != __retval); }
/// <summary> /// Returns the value at the specified key as type list. The returned value /// will reference existing data and modifications to the 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 CfxListValue GetList(string key) { var key_pinned = new PinnedString(key); var __retval = CfxApi.DictionaryValue.cfx_dictionary_value_get_list(NativePtr, key_pinned.Obj.PinnedPtr, key_pinned.Length); key_pinned.Obj.Free(); return(CfxListValue.Wrap(__retval)); }
internal static CfxListValue Wrap(IntPtr nativePtr) { if (nativePtr == IntPtr.Zero) { return(null); } lock (weakCache) { var wrapper = (CfxListValue)weakCache.Get(nativePtr); if (wrapper == null) { wrapper = new CfxListValue(nativePtr); weakCache.Add(wrapper); } else { CfxApi.cfx_release(nativePtr); } return(wrapper); } }
/// <summary> /// Returns true (1) if this object and |that| object have the same underlying /// data. If true (1) modifications to this object will also affect |that| /// object and vice-versa. /// </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 IsSame(CfxListValue that) { return 0 != CfxApi.cfx_list_value_is_same(NativePtr, CfxListValue.Unwrap(that)); }
/// <summary> /// Returns true (1) if this object and |that| object have an equivalent /// underlying value but are not necessarily the same 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 IsEqual(CfxListValue that) { return 0 != CfxApi.cfx_list_value_is_equal(NativePtr, CfxListValue.Unwrap(that)); }
/// <summary> /// Creates a new object that is not owned by any other 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 static CfxListValue Create() { return(CfxListValue.Wrap(CfxApi.cfx_list_value_create())); }
/// <summary> /// Sets the value at the specified index as type list. Returns true (1) if the /// value was set successfully. If |value| is currently owned by another object /// then the value will be copied and the |value| reference will not change. /// Otherwise, ownership will be transferred to this object and the |value| /// reference will be invalidated. /// </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 SetList(int index, CfxListValue value) { return(0 != CfxApi.cfx_list_value_set_list(NativePtr, index, CfxListValue.Unwrap(value))); }
/// <summary> /// Returns the value at the specified index as type list. The returned value /// will reference existing data and modifications to the 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 CfxListValue GetList(int index) { return(CfxListValue.Wrap(CfxApi.cfx_list_value_get_list(NativePtr, index))); }
/// <summary> /// Returns the value at the specified index as type list. The returned value /// will reference existing data and modifications to the 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 CfxListValue GetList(ulong index) { return(CfxListValue.Wrap(CfxApi.ListValue.cfx_list_value_get_list(NativePtr, (UIntPtr)index))); }
/// <summary> /// Returns true (1) if this object and |that| object have an equivalent /// underlying value but are not necessarily the same 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 IsEqual(CfxListValue that) { return(0 != CfxApi.cfx_list_value_is_equal(NativePtr, CfxListValue.Unwrap(that))); }
/// <summary> /// Returns true (1) if this object and |that| object have the same underlying /// data. If true (1) modifications to this object will also affect |that| /// object and vice-versa. /// </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 IsSame(CfxListValue that) { return(0 != CfxApi.cfx_list_value_is_same(NativePtr, CfxListValue.Unwrap(that))); }
/// <summary> /// Sets the underlying value as type list. Returns true (1) if the value was /// set successfully. This object keeps a reference to |value| and ownership of /// the underlying data remains unchanged. /// </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 SetList(CfxListValue value) { return(0 != CfxApi.Value.cfx_value_set_list(NativePtr, CfxListValue.Unwrap(value))); }
/// <summary> /// Sets the value at the specified index as type list. Returns true (1) if the /// value was set successfully. If |value| is currently owned by another object /// then the value will be copied and the |value| reference will not change. /// Otherwise, ownership will be transferred to this object and the |value| /// reference will be invalidated. /// </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 SetList(ulong index, CfxListValue value) { return(0 != CfxApi.ListValue.cfx_list_value_set_list(NativePtr, (UIntPtr)index, CfxListValue.Unwrap(value))); }
/// <summary> /// Sets the value at the specified index as type list. Returns true (1) if the /// value was set successfully. If |value| is currently owned by another object /// then the value will be copied and the |value| reference will not change. /// Otherwise, ownership will be transferred to this object and the |value| /// reference will be invalidated. /// </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 SetList(int index, CfxListValue value) { return 0 != CfxApi.cfx_list_value_set_list(NativePtr, index, CfxListValue.Unwrap(value)); }
/// <summary> /// Returns a writable copy of 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 CfxListValue Copy() { return(CfxListValue.Wrap(CfxApi.cfx_list_value_copy(NativePtr))); }
internal static CfxListValue Wrap(IntPtr nativePtr) { if(nativePtr == IntPtr.Zero) return null; lock(weakCache) { var wrapper = (CfxListValue)weakCache.Get(nativePtr); if(wrapper == null) { wrapper = new CfxListValue(nativePtr); weakCache.Add(wrapper); } else { CfxApi.cfx_release(nativePtr); } return wrapper; } }
/// <summary> /// Sets the value at the specified key as type list. Returns true (1) if the /// value was set successfully. If |value| is currently owned by another object /// then the value will be copied and the |value| reference will not change. /// Otherwise, ownership will be transferred to this object and the |value| /// reference will be invalidated. /// </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 SetList(string key, CfxListValue value) { var key_pinned = new PinnedString(key); var __retval = CfxApi.cfx_dictionary_value_set_list(NativePtr, key_pinned.Obj.PinnedPtr, key_pinned.Length, CfxListValue.Unwrap(value)); key_pinned.Obj.Free(); return 0 != __retval; }