Ejemplo n.º 1
0
        public EntityCollector CreateDependingDemands(Providers providers)
        {
            EntityCollector entityCollector = new EntityCollector();

            foreach (var provider in providers)
            {
                EntityCollector response;
                if (provider.GetType() == typeof(ProductionOrder))
                {
                    response = _productionManager.CreateDependingDemands(provider);
                    entityCollector.AddAll(response);
                }
                else if (provider.GetType() == typeof(StockExchangeProvider))
                {
                    response = _stockManager.CreateDependingDemands(provider);
                    entityCollector.AddAll(response);
                }
            }

            return(entityCollector);
        }