Ejemplo n.º 1
0
        public OrderController(IOrdersService ordersService, IFullContactInfosService fullContactInfosService, IProductsService productService)
        {
            Guard.WhenArgument(ordersService, "ordersService").IsNull().Throw();
            Guard.WhenArgument(fullContactInfosService, "fullContactInfoService").IsNull().Throw();
            Guard.WhenArgument(productService, "productService").IsNull().Throw();

            this.ordersService           = ordersService;
            this.fullContactInfosService = fullContactInfosService;
            this.productService          = productService;
        }
Ejemplo n.º 2
0
        public ShoppingCartController
        (
            IProductsService productsService,
            UserManager <User> userManager,
            IOrdersService ordersService,
            IFullContactInfosService fullContactInfosService,
            IShortContactInfoService shortContactInfoService
        )
        {
            Guard.WhenArgument(productsService, "productsService").IsNull().Throw();
            Guard.WhenArgument(userManager, "userManager").IsNull().Throw();
            Guard.WhenArgument(ordersService, "ordersService").IsNull().Throw();
            Guard.WhenArgument(fullContactInfosService, "fullContactInfosService").IsNull().Throw();
            Guard.WhenArgument(shortContactInfoService, "shortContactInfoService").IsNull().Throw();

            this.productsService         = productsService;
            this.userManager             = userManager;
            this.ordersService           = ordersService;
            this.fullContactInfosService = fullContactInfosService;
            this.shortContactInfoService = shortContactInfoService;
        }