private void AddChangedDoc(BatchSet changeSet, ChangesResponse <string> .Row row, SyncLogItem logItem, Filter query, MyCouch.Serialization.ISerializer serializer)
        {
            if (changeSet.ChangedDocuments == null)
            {
                changeSet.ChangedDocuments = new List <SiaqodbDocument>();
            }
            CouchDBDocument co = serializer.Deserialize <CouchDBDocument>(row.IncludedDoc);

            if (co._id.StartsWith("_design/"))
            {
                return;
            }
            //check uploaded anchor- means cliet just uploaded this record and we should not return back
            if (logItem != null && logItem.KeyVersion != null && logItem.KeyVersion.ContainsKey(co._id) && logItem.KeyVersion[co._id] == co._rev)
            {
                return;
            }
            if (OutOfFilter(query, co))
            {
                return;
            }
            changeSet.ChangedDocuments.Add(Mapper.ToSiaqodbDocument(co));
        }
Beispiel #2
0
 public T Deserialize <T>(string data)
 {
     return(serializer.Deserialize <T>(data));
 }