Esempio n. 1
0
    private static void DeleteProducts(ShoppingCenter shoppingCenter, string[] args)
    {
        if (!args.Any())
        {
            return;
        }

        var count = 0;

        if (args.Length > 1)
        {
            var name     = args[0];
            var producer = args[1];
            count = shoppingCenter.DeleteProductsByNameAndProducer(name, producer);
        }
        else
        {
            count = shoppingCenter.DeleteProductsByProducer(args[0]);
        }

        Print(count);
    }