private async Task ResultAskForAnotherBook(YesNoEnum.YesNo option) { switch (option) { case YesNoEnum.YesNo.S: await GetBookTitle(true); break; default: break; } }
private async Task ResultAskPaidFine(YesNoEnum.YesNo option) { switch (option) { case YesNoEnum.YesNo.S: await PayFine(); break; default: this.isPaid = false; break; } }
private async Task AskForAnotherBook() { string value = Console.ReadLine(); try { YesNoEnum.YesNo option = (YesNoEnum.YesNo)Enum.Parse(typeof(YesNoEnum.YesNo), value.ToUpper()); await ResultAskForAnotherBook(option); } catch (Exception) { Console.WriteLine(Exceptions.LetterAskYesNoException); await AskForAnotherBook(); } }