private static int Foreach( IntPtr backend, GitOdbBackend.foreach_callback_callback cb, IntPtr data) { OdbBackend odbBackend = GCHandle.FromIntPtr(Marshal.ReadIntPtr(backend, GitOdbBackend.GCHandleOffset)).Target as OdbBackend; if (odbBackend != null) { try { return(odbBackend.ForEach(new ForeachState(cb, data).ManagedCallback)); } catch (Exception ex) { Proxy.giterr_set_str(GitErrorCategory.Odb, ex); } } return((int)GitErrorCode.Error); }
private static int Foreach( IntPtr backend, GitOdbBackend.foreach_callback_callback cb, IntPtr data) { OdbBackend odbBackend = MarshalOdbBackend(backend); if (odbBackend == null) { return((int)GitErrorCode.Error); } try { return(odbBackend.ForEach(new ForeachState(cb, data).ManagedCallback)); } catch (Exception ex) { Proxy.giterr_set_str(GitErrorCategory.Odb, ex); return((int)GitErrorCode.Error); } }