示例#1
0
 public SyncKnowledge GetCurrentSyncKnowledge()
 {
     using (SyncDetails sync = new LocalSyncDetails(RemoteDirectoryPath, true))
     {
         return sync.SyncKnowledge;
     }
 }
示例#2
0
        public byte[] GetChanges(uint batchSize, SyncKnowledge destinationKnowledge, LocalSyncDetails syncDetails)
        {
            ChangeBatchTransfer changeBatch = new ChangeBatchTransfer();
            object dataRetriver = new object();
            changeBatch.ChangeBatch = syncDetails.GetChangeBatch(RemoteDirectoryPath, batchSize, destinationKnowledge, out dataRetriver);
            changeBatch.ChangeDataRetriever = dataRetriver;

            return changeBatch.ObjectToByteArray();
        }
示例#3
0
 public LocalStore(string folderPath)
 {
     sync = new LocalSyncDetails(folderPath, true);
     this.folderPath = folderPath;
 }
示例#4
0
 public void StoreKnowledgeForScope(SyncKnowledge knowledge, ForgottenKnowledge forgotten)
 {
     using (SyncDetails sync = new LocalSyncDetails(RemoteDirectoryPath, false))
     {
         sync.StoreKnowledgeForScope(knowledge, forgotten);
     }
 }
示例#5
0
        public bool SaveSyncSession(LocalSyncDetails localSync)
        {
            localSync.Save(RemoteDirectoryPath);

            return true;
        }