public Guid AddJournalPage(string title, string content) { JournalPage journalPage = new JournalPage(title, content); _pages.Add(journalPage); // agrega página nueva return(journalPage.Id); }
public Guid AddJournalPage(string title, string content) { JournalPage journalPage = new JournalPage(title, content); _pages.Add(journalPage); _logger.Information($"Added new page with Id: {journalPage.Id.ToString()} to Jornal: '{journalPage.Title}'"); return(journalPage.Id); }
public void Print(JournalPage page) { StringBuilder stringBuilder = new StringBuilder(); //hace el contenido stringBuilder.Append($"Journal Page Title: {page.Title}\n"); stringBuilder.Append($"Journal Page Date: {page.Date.ToLongDateString()}\n"); stringBuilder.Append($"Journal Page Content: {page.Content}\n"); Console.WriteLine(stringBuilder.ToString()); }
public void PrintJournalPage(JournalPage journalPage) { _printer.Print(journalPage); }
public void PrintJournalPageWithId(Guid id) { JournalPage journalPage = _pages.Find(nt => nt.Id == id); PrintJournalPage(journalPage); }
public void DeleteJournalPageWithId(Guid id) { JournalPage journalPage = _pages.Find(nt => nt.Id == id); DeleteJournalPage(journalPage); }
public void DeleteJournalPage(JournalPage journalPage) { _pages.Remove(journalPage); }
public void PrintJournalPage(JournalPage journalPage) { _printer.Print(journalPage); _logger.Information($"Printed page with Id: {journalPage.Id.ToString()} from Jornal: '{journalPage.Title}'"); }
public void DeleteJournalPage(JournalPage journalPage) { _pages.Remove(journalPage); _logger.Information($"Removed page with Id: {journalPage.Id.ToString()} from Jornal: '{journalPage.Title}'"); }