コード例 #1
0
        public override void Execute(string[] commandData)
        {
            string name             = commandData[0];
            string phoneForRemoving = commandData[1];

            phoneForRemoving = this.Converter.ConvertPhoneNumber(phoneForRemoving);
            bool isRemoved = PhonebookRepository.RemovePhone(name, phoneForRemoving);

            if (isRemoved)
            {
                Printer.Print("Successfully removed");
            }
            else
            {
                Printer.Print("Phone number could not be found");
            }
        }