Beispiel #1
0
 private Tag CreateTagIfNeeded(INoteStore note, string name, string parent = null)
 {
     if (AllTags.Any(m => m.Name == name) == false)
     {
         Tag newTag = new Tag {
             Name = name
         };
         if (parent != null)
         {
             newTag.ParentGuid = parent;
         }
         newTag = note.CreateTag(newTag);
         allTags.Add(newTag);
         return(newTag);
     }
     return(AllTags.First(m => m.Name == name));
 }
Beispiel #2
0
 public NoteEventHandler(INoteStore store) => this.store = store;
Beispiel #3
0
 public NotesController(INoteStore noteStore)
 {
     _noteStore = noteStore;
 }
Beispiel #4
0
 public NotesController(ICommandSender commandSender, INoteStore store)
 {
     this.commandSender = commandSender;
     this.store         = store;
 }
Beispiel #5
0
 public NoteController(
     INoteStore store
     )
 {
     _store = store;
 }
Beispiel #6
0
 private Tag CreateTagIfNeeded(INoteStore note, string name, string parent = null)
 {
     if (AllTags.Any(m => m.Name == name) == false)
     {
         Tag newTag = new Tag { Name = name };
         if (parent != null) newTag.ParentGuid = parent;
         newTag = note.CreateTag(newTag);
         allTags.Add(newTag);
         return newTag;
     }
     return AllTags.First(m => m.Name == name);
 }
 public NoteCommandHandler(INoteStore store) => this.store = store;