コード例 #1
0
 /// <summary>Renders the notes to the console.</summary>
 /// <param name="noteBook">The notebook to take notes from.</param>
 /// <param name="numbers">The numbers of notes to render.</param>
 public void RenderNotes(NoteBook noteBook, params int[] numbers)
 {
     foreach (var number in numbers)
     {
         this.noteRenderer.Render($"Note #{number}");
         this.noteRenderer.RenderNote(noteBook[number]);
     }
 }
コード例 #2
0
 /// <summary>Renders the notebook to the console.</summary>
 /// <param name="noteBook">The notebook.</param>
 public void RenderNoteBook(NoteBook noteBook)
 {
     this.noteRenderer.Render(noteBook.ToString());
 }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NoteBookService"/> class.Prevents a default Instance of the <see cref="NoteBookService"/> class from being created.</summary>
 private NoteBookService()
 {
     this.noteBook = new NoteBook();
     this.renderer = new NoteBookRenderer();
 }