예제 #1
0
        public void Count(string element)
        {
            int counter = 0;

            for (int i = 0; i < workList.Count; i++)
            {
                if (workList[i] == element)
                {
                    counter++;
                }
            }

            ConsoleManager.WriteLine(counter.ToString());
        }
        public void Listen()
        {
            string commandInput = ConsoleManager.Read();

            while (commandInput != EndCommand)
            {
                try
                {
                    this.ParseCommand(commandInput);
                }
                catch (ArgumentException ex)
                {
                    ConsoleManager.WriteLine(ex.Message);
                }

                commandInput = ConsoleManager.Read();
            }
        }
예제 #3
0
 public void PrintWorkingList()
 {
     ConsoleManager.WriteLine(string.Join(" ", this.workList));
 }