public static void Show(ContactBook book) { while (true) { PromptE.Menu("[UVV Contacts] Pick an option") .Action(new AddContactButton(book)) .Action("List contacts", () => ContactsMenu.Show(book)) .Action(new ExitApplicationAction()) .Show(); } // ReSharper disable once FunctionNeverReturns }
public static void Show(ContactBook book) { var contact = ContactSelectorMenu.Show(book); if (contact == null) { return; } PromptE.Menu($"[name: {contact.DisplayName} | email: {contact.Email} | cell: {contact.CellphoneNumber}]") .Action(new UpdateContactAction(book, contact)) .Action("Delete", () => book.Remove(contact)) .Action("[Cancel]", null) .Show(); }