private void CheckSelf(cef_navigation_entry_visitor_t *self) { if (_self != self) { throw ExceptionBuilder.InvalidSelfReference(); } }
protected virtual void Dispose(bool disposing) { if (_self != null) { cef_navigation_entry_visitor_t.Free(_self); _self = null; } }
private int visit(cef_navigation_entry_visitor_t *self, cef_navigation_entry_t *entry, int current, int index, int total) { CheckSelf(self); var m_entry = CefNavigationEntry.FromNative(entry); var m_result = Visit(m_entry, current != 0, index, total); m_entry.Dispose(); return(m_result ? 1 : 0); }
public CefNavigationEntryVisitor() { cef_navigation_entry_visitor_t *self = this.NativeInstance; #if NET_LESS_5_0 self->visit = (void *)Marshal.GetFunctionPointerForDelegate(fnVisit); #else self->visit = (delegate * unmanaged[Stdcall] < cef_navigation_entry_visitor_t *, cef_navigation_entry_t *, int, int, int, int >) & VisitImpl; #endif }
private void add_ref(cef_navigation_entry_visitor_t *self) { lock (SyncRoot) { var result = ++_refct; if (result == 1) { lock (_roots) { _roots.Add((IntPtr)_self, this); } } } }
private int release(cef_navigation_entry_visitor_t *self) { lock (SyncRoot) { var result = --_refct; if (result == 0) { lock (_roots) { _roots.Remove((IntPtr)_self); } return(1); } return(0); } }
protected CefNavigationEntryVisitor() { _self = cef_navigation_entry_visitor_t.Alloc(); _ds0 = new cef_navigation_entry_visitor_t.add_ref_delegate(add_ref); _self->_base._add_ref = Marshal.GetFunctionPointerForDelegate(_ds0); _ds1 = new cef_navigation_entry_visitor_t.release_delegate(release); _self->_base._release = Marshal.GetFunctionPointerForDelegate(_ds1); _ds2 = new cef_navigation_entry_visitor_t.has_one_ref_delegate(has_one_ref); _self->_base._has_one_ref = Marshal.GetFunctionPointerForDelegate(_ds2); _ds3 = new cef_navigation_entry_visitor_t.visit_delegate(visit); _self->_visit = Marshal.GetFunctionPointerForDelegate(_ds3); }
public CefNavigationEntryVisitor(cef_navigation_entry_visitor_t *instance) : base((cef_base_ref_counted_t *)instance) { }
public CefNavigationEntryVisitor() { cef_navigation_entry_visitor_t *self = this.NativeInstance; self->visit = (void *)Marshal.GetFunctionPointerForDelegate(fnVisit); }
private int has_one_ref(cef_navigation_entry_visitor_t *self) { lock (SyncRoot) { return(_refct == 1 ? 1 : 0); } }
internal static void Free(cef_navigation_entry_visitor_t *ptr) { Marshal.FreeHGlobal((IntPtr)ptr); }
public unsafe extern void GetNavigationEntries(cef_navigation_entry_visitor_t *visitor, int current_only);
/// <summary> /// Retrieve a snapshot of current navigation entries as values sent to the /// specified visitor. If |current_only| is true only the current navigation /// entry will be sent, otherwise all navigation entries will be sent. /// </summary> public void GetNavigationEntries(cef_navigation_entry_visitor_t *visitor, int current_only) { throw new NotImplementedException(); // TODO: CefBrowserHost.GetNavigationEntries }
private int visit(cef_navigation_entry_visitor_t *self, cef_navigation_entry_t *entry, int current, int index, int total) { CheckSelf(self); throw new NotImplementedException(); // TODO: CefNavigationEntryVisitor.Visit }