public virtual void Changed(Database.ChangeEvent @event)
        {
            IList <DocumentChange> changes = @event.GetChanges();

            foreach (DocumentChange change in changes)
            {
                RevisionInternal rev = change.GetAddedRevision();
                NUnit.Framework.Assert.IsNotNull(rev);
                NUnit.Framework.Assert.IsNotNull(rev.GetDocId());
                NUnit.Framework.Assert.IsNotNull(rev.GetRevId());
                NUnit.Framework.Assert.AreEqual(rev.GetDocId(), rev.GetProperties().Get("_id"));
                NUnit.Framework.Assert.AreEqual(rev.GetRevId(), rev.GetProperties().Get("_rev"));
            }
        }
Example #2
0
        public void Changed(Database.ChangeEvent @event)
        {
            IList <DocumentChange> changes = @event.GetChanges();

            foreach (DocumentChange change in changes)
            {
                // Skip revisions that originally came from the database I'm syncing to:
                Uri source = change.GetSourceUrl();
                if (source != null && source.Equals(remote))
                {
                    return;
                }
                RevisionInternal             rev         = change.GetAddedRevision();
                IDictionary <string, object> paramsFixMe = null;
                // TODO: these should not be null
                if (GetLocalDatabase().RunFilter(filter, paramsFixMe, rev))
                {
                    AddToInbox(rev);
                }
            }
        }