Пример #1
0
 public void UploadNotes(IList <Note> notes)
 {
     foreach (Note note in notes)
     {
         pendingCommits.Add(NoteConvert.ToNoteInfo(note));
     }
 }
Пример #2
0
        public IDictionary <string, NoteUpdate> GetNoteUpdatesSince(int revision)
        {
            Dictionary <string, NoteUpdate> updates =
                new Dictionary <string, NoteUpdate> ();
            int?latestRevision;
            IList <NoteInfo> serverNotes = user.GetNotes(true, revision, out latestRevision);

            VerifyLatestSyncRevision(latestRevision);
            foreach (NoteInfo noteInfo in serverNotes)
            {
                string     noteXml = NoteConvert.ToNoteXml(noteInfo);
                NoteUpdate update  = new NoteUpdate(noteXml,
                                                    noteInfo.Title,
                                                    noteInfo.Guid,
                                                    noteInfo.LastSyncRevision.Value);
                updates.Add(noteInfo.Guid, update);
            }
            return(updates);
        }