Exemple #1
0
        private async Task ResultAskForAnotherBook(YesNoEnum.YesNo option)
        {
            switch (option)
            {
            case YesNoEnum.YesNo.S:
                await GetBookTitle(true);

                break;

            default:
                break;
            }
        }
Exemple #2
0
        private async Task ResultAskPaidFine(YesNoEnum.YesNo option)
        {
            switch (option)
            {
            case YesNoEnum.YesNo.S:
                await PayFine();

                break;

            default:
                this.isPaid = false;
                break;
            }
        }
Exemple #3
0
        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();
            }
        }