Пример #1
0
        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);
            });
        }
Пример #2
0
 private void Log(C4LogLevel level, C4Slice s)
 {
     WriteLine($"[{level}] {s.CreateString()}");
 }
Пример #3
0
        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);
        }