protected static DTO.GetNotesResponse GetStoredNotes(INoteRepository note_repo) { var notes = new List <DTO.DTONote> (); var stored_notes = note_repo.Engine.GetNotes(); foreach (var kvp in stored_notes) { var note = kvp.Value.ToDTONote(); // if we have a sync revision, set it if (note_repo.Manifest.NoteRevisions.Keys.Contains(note.Guid)) { note.LastSyncRevision = note_repo.Manifest.NoteRevisions [note.Guid]; } notes.Add(note); } var return_notes = new DTO.GetNotesResponse(); return_notes.Notes = notes; return_notes.LatestSyncRevision = note_repo.Manifest.LastSyncRevision; return(return_notes); }
protected static DTO.GetNotesResponse GetStoredNotes(INoteRepository note_repo) { var notes = new List<DTO.DTONote> (); var stored_notes = note_repo.Engine.GetNotes (); foreach (var kvp in stored_notes) { var note = kvp.Value.ToDTONote (); // if we have a sync revision, set it if (note_repo.Manifest.NoteRevisions.Keys.Contains (note.Guid)) { note.LastSyncRevision = note_repo.Manifest.NoteRevisions [note.Guid]; } notes.Add (note); } var return_notes = new DTO.GetNotesResponse (); return_notes.Notes = notes; return_notes.LatestSyncRevision = note_repo.Manifest.LastSyncRevision; return return_notes; }