コード例 #1
0
 public DataImportController(DataContext db, ICategoryService categoryService,
                             IProductFinder productFinder, IProductService productService)
     : base(db)
 {
     this.categoryService = categoryService;
     this.productFinder   = productFinder;
     this.productService  = productService;
 }
コード例 #2
0
 public DataImportController(DataContext db, ICategoryService categoryService,
     IProductFinder productFinder, IProductService productService)
     : base(db)
 {
     this.categoryService = categoryService;
     this.productFinder = productFinder;
     this.productService = productService;
 }
コード例 #3
0
ファイル: ProductController.cs プロジェクト: tuaasn/Cart42
 public ProductController(ISettingService settings, ICategoryService categoryService,
                          IProductFinder productFinder, IUploadService uploadService)
 {
     this.settings        = settings;
     this.categoryService = categoryService;
     this.productFinder   = productFinder;
     this.uploadService   = uploadService;
 }
コード例 #4
0
 public ProductController(ISettingService settings, ICategoryService categoryService,
     IProductFinder productFinder, IUploadService uploadService)
 {
     this.settings = settings;
     this.categoryService = categoryService;
     this.productFinder = productFinder;
     this.uploadService = uploadService;
 }
コード例 #5
0
ファイル: ProductController.cs プロジェクト: tuaasn/Cart42
 public ProductController(DataContext db, IProductFinder productFinder, IDeleterService deleterService,
                          IProductService productService, ITaxClassService taxClassService, ISettingService settingService) : base(db)
 {
     this.productFinder   = productFinder;
     this.deleterService  = deleterService;
     this.productService  = productService;
     this.taxClassService = taxClassService;
     this.settingService  = settingService;
 }
コード例 #6
0
ファイル: ProductService.cs プロジェクト: alin-rautoiu/Cart42
 public ProductService(DataContext db, IProductFinder productFinder, ICategoryService categoryService,
     IProductSkuService productSkuService, ICacheService cacheService)
 {
     this.db = db;
     this.productFinder = productFinder;
     this.categoryService = categoryService;
     this.productSkuService = productSkuService;
     this.cacheService = cacheService;
 }
コード例 #7
0
ファイル: DataExportService.cs プロジェクト: tuaasn/Cart42
        public DataExportService()
        {
            // Not using structuremap as dependencies are being disposed too early

            db = DataContext.Create();
            categoryService    = new CategoryService(db, null, new CacheService());
            productFinder      = new ProductFinder(db, categoryService);
            workProcessService = new WorkProcessService(db);
        }
コード例 #8
0
ファイル: ProductService.cs プロジェクト: tuaasn/Cart42
 public ProductService(DataContext db, IProductFinder productFinder, ICategoryService categoryService,
                       IProductSkuService productSkuService, ICacheService cacheService)
 {
     this.db                = db;
     this.productFinder     = productFinder;
     this.categoryService   = categoryService;
     this.productSkuService = productSkuService;
     this.cacheService      = cacheService;
 }
コード例 #9
0
        public void FindProduct_ReturnsNothing()
        {
            IProductFinder productFinder = BuildEmptyInventory();

            // Act
            var result = productFinder.FindProduct("barcodeDoesntExist");

            result.Should().BeNull();
        }
コード例 #10
0
        public DataExportService()
        {
            // Not using structuremap as dependencies are being disposed too early

            db = DataContext.Create();
            categoryService = new CategoryService(db, null, new CacheService());
            productFinder = new ProductFinder(db, categoryService);
            workProcessService = new WorkProcessService(db);
        }
コード例 #11
0
 public ProductController(DataContext db, IProductFinder productFinder, IDeleterService deleterService,
     IProductService productService, ITaxClassService taxClassService, ISettingService settingService)
     : base(db)
 {
     this.productFinder = productFinder;
     this.deleterService = deleterService;
     this.productService = productService;
     this.taxClassService = taxClassService;
     this.settingService = settingService;
 }
コード例 #12
0
        public void FindProduct_ReturnsStuff()
        {
            Product        prod          = new Product("existingBarcode", 10);
            IProductFinder productFinder = BuildInventoryWith(prod);

            // Act
            var result = productFinder.FindProduct("existingBarcode");

            result.Should().Be(prod);
        }
コード例 #13
0
 public OrderController(DataContext db, ICustomerService customerService, IProductFinder productFinder,
                        IShippingService shippingService, ITaxService taxService, ISettingService settingService,
                        IOrderService orderService, IOptionService optionService) : base(db)
 {
     this.customerService = customerService;
     this.productFinder   = productFinder;
     this.shippingService = shippingService;
     this.taxService      = taxService;
     this.settingService  = settingService;
     this.orderService    = orderService;
     this.optionService   = optionService;
 }
コード例 #14
0
 public OrderController(DataContext db, ICustomerService customerService, IProductFinder productFinder,
     IShippingService shippingService, ITaxService taxService, ISettingService settingService,
     IOrderService orderService, IOptionService optionService)
     : base(db)
 {
     this.customerService = customerService;
     this.productFinder = productFinder;
     this.shippingService = shippingService;
     this.taxService = taxService;
     this.settingService = settingService;
     this.orderService = orderService;
     this.optionService = optionService;
 }
コード例 #15
0
 public CashRegister(IProductFinder productFinder)
 {
     _productFinder = productFinder;
 }
コード例 #16
0
 public ProductService(IProductFinder productFinder)
 {
     _productFinder = productFinder;
 }
コード例 #17
0
 public App(IConfiguration configuration, IProductFinder productFinder)
 {
     Configuration = configuration ?? throw new ArgumentNullException(nameof(configuration));
     ProductFinder = productFinder ?? throw new ArgumentNullException(nameof(productFinder));
 }
コード例 #18
0
 public ProductService(IUnitOfWork unitOfWork, IRepository <Product> repository, IProductFinder finder)
 {
     _unitOfWork = unitOfWork;
     _repository = repository;
     _finder     = finder;
 }
コード例 #19
0
 public ProductController(IProductFinder productFinder)
 {
     _productFinder = productFinder;
 }