Пример #1
0
        /// <summary>
        /// Processing choice.
        /// </summary>
        /// <param name="choice"> Your choice </param>
        /// <param name="booklet"> Booklet </param>
        private static void ProcessingChoice(int choice, IPublication booklet)
        {
            switch (choice)
            {
            case 1:
                PrintMessage("Enter new text: ", ConsoleColor.Yellow);
                booklet.Write(new StringBuilder(Console.ReadLine()));
                break;

            case 2:
                PrintMessage("Enter text for append: ", ConsoleColor.Yellow);
                booklet.Append(new StringBuilder(Console.ReadLine()));
                break;

            case 3:
                booklet.Read();
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }