Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the
        /// <see cref="ProductsController" /> class.
        /// </summary>
        /// <param name="mapper">The mapper.</param>
        /// <param name="productService">The product service.</param>
        public StationsController(
            IMappingEngine mapper,
            IProductionStationService stationService) : base(mapper)
        {
            if (stationService == null)
            {
                throw new ArgumentNullException("stationService");
            }

            this.StationService = stationService;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the
        /// <see cref="HomeController" /> class.
        /// </summary>
        /// <param name="mapper">The mapper.</param>
        /// <param name="productService">The product service.</param>
        public ReportController(
            IMappingEngine mapper,
            IProductService productService,
            IProductionStageService productionStageService,
            IProductionStationService stationService)
            : base(mapper)
        {
            if (productService == null)
            {
                throw new ArgumentNullException("productService");
            }
            else if (productionStageService == null)
            {
                throw new ArgumentNullException("productionStageService");
            }
            else if (stationService == null)
            {
                throw new ArgumentNullException("stationService");
            }

            this.ProductService         = productService;
            this.ProductionStageService = productionStageService;
            this.StationService         = stationService;
        }