private static void OnDocError(C4Replicator *repl, bool pushing, C4Slice docID, C4Error error, bool transient, void *context) { var replicator = GCHandle.FromIntPtr((IntPtr)context).Target as Replicator; replicator?.DispatchQueue.DispatchAsync(() => { replicator.OnDocError(error, pushing, docID.CreateString() ?? "", transient); }); }
private void Log(C4LogLevel level, C4Slice s) { WriteLine($"[{level}] {s.CreateString()}"); }
private static void DocObserverCallback(C4DocumentObserver *obs, C4Slice docId, ulong sequence, void *context) { var obj = GCHandle.FromIntPtr((IntPtr)context).Target as ObserverTest; obj.DocObserverCalled(obs, docId.CreateString(), sequence); }