Ejemplo n.º 1
0
 // Создание заметки
 public static Note CreateNote(User user, string title = "", string content = "")
 {
     Note note = new Note(user, title, content);
     notes.Add(note);
     return note;
 }
Ejemplo n.º 2
0
 static void printNote(Note note)
 {
     Console.WriteLine("[Title: {0}, Content: {1}]", note.Title, note.Content);
 }
 public NoteException(User user, Note note, string message = "")
     : base(message)
 {
     this.User = user;
     this.Note = note;
 }
 public NotOwnerOfNoteException(User user, Note note)
     : base(user, note, "This user is not owner of this note")
 {
 }
 public NotEditableNoteException(User user, Note note)
     : base(user, note, "This note is not editable for this user")
 {
 }