Exemplo n.º 1
0
        public void LoadCallingList(string inputCalling)
        {
            var listOfCalls = inputCalling
                              .Split(new[] { ' ' })
                              .ToList();

            foreach (var phoneNumber in listOfCalls)
            {
                try
                {
                    var validNumber = new Calling(phoneNumber);
                    Console.WriteLine(this.PrintCall(validNumber));
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.Message);
                }
            }
        }
Exemplo n.º 2
0
        public void LoadCallingList(string inputCalling)
        {
            var listOfCalls = inputCalling
                              .Split(new[] { ' ' })
                              .ToList();

            foreach (var phoneNumber in listOfCalls)
            {
                //try
                //{
                var validNumber = new Calling(phoneNumber);
                //Console.WriteLine(this.PrintCall(validNumber));
                callings.Add(validNumber);
                //}
                //catch (Exception ex)
                //{
                //    callings.Add(ex.Message);
                //    Console.WriteLine(ex.Message);
                //}
            }
        }
Exemplo n.º 3
0
 public string PrintCall(Calling newCall)
 {
     return(newCall.Call());
 }