Exemplo n.º 1
0
 public InputInspectionMaterialService(IServiceProvider serviceProvider)
 {
     _repository = serviceProvider.GetService <IDyeingPrintingAreaInputRepository>();
     _productionOrderRepository = serviceProvider.GetService <IDyeingPrintingAreaInputProductionOrderRepository>();
     _movementRepository        = serviceProvider.GetService <IDyeingPrintingAreaMovementRepository>();
     _summaryRepository         = serviceProvider.GetService <IDyeingPrintingAreaSummaryRepository>();
 }
 public DyeingPrintingAreaInputRepository(PackingInventoryDbContext dbContext, IServiceProvider serviceProvider)
 {
     _dbContext           = dbContext;
     _dbSet               = dbContext.Set <DyeingPrintingAreaInputModel>();
     _outputSPPRepository = serviceProvider.GetService <IDyeingPrintingAreaOutputProductionOrderRepository>();
     _identityProvider    = serviceProvider.GetService <IIdentityProvider>();
     _SPPRepository       = serviceProvider.GetService <IDyeingPrintingAreaInputProductionOrderRepository>();
 }
 public InputShippingService(IServiceProvider serviceProvider)
 {
     _repository                = serviceProvider.GetService <IDyeingPrintingAreaInputRepository>();
     _movementRepository        = serviceProvider.GetService <IDyeingPrintingAreaMovementRepository>();
     _summaryRepository         = serviceProvider.GetService <IDyeingPrintingAreaSummaryRepository>();
     _outputRepository          = serviceProvider.GetService <IDyeingPrintingAreaOutputRepository>();
     _productionOrderRepository = serviceProvider.GetService <IDyeingPrintingAreaInputProductionOrderRepository>();
     _outputSPPRepository       = serviceProvider.GetService <IDyeingPrintingAreaOutputProductionOrderRepository>();
 }
 public StockWarehouseService(IServiceProvider serviceProvider)
 {
     _outputBonRepository = serviceProvider.GetService <IDyeingPrintingAreaOutputRepository>();
     _movementRepository  = serviceProvider.GetService <IDyeingPrintingAreaMovementRepository>();
     _summaryRepository   = serviceProvider.GetService <IDyeingPrintingAreaSummaryRepository>();
     _inputSppRepository  = serviceProvider.GetService <IDyeingPrintingAreaInputProductionOrderRepository>();
     _inputBonRepository  = serviceProvider.GetService <IDyeingPrintingAreaInputRepository>();
     _outputSppRepository = serviceProvider.GetService <IDyeingPrintingAreaOutputProductionOrderRepository>();
 }
 public InputAvalTransformationService(IServiceProvider serviceProvider)
 {
     _repository                      = serviceProvider.GetService <IDyeingPrintingAreaInputRepository>();
     _movementRepository              = serviceProvider.GetService <IDyeingPrintingAreaMovementRepository>();
     _summaryRepository               = serviceProvider.GetService <IDyeingPrintingAreaSummaryRepository>();
     _outputRepository                = serviceProvider.GetService <IDyeingPrintingAreaOutputRepository>();
     _inputProductionOrderRepository  = serviceProvider.GetService <IDyeingPrintingAreaInputProductionOrderRepository>();
     _outputProductionOrderRepository = serviceProvider.GetService <IDyeingPrintingAreaOutputProductionOrderRepository>();
 }
Exemplo n.º 6
0
        public Mock <IServiceProvider> GetServiceProvider(IDyeingPrintingAreaInputRepository repository, IDyeingPrintingAreaMovementRepository movementRepo,
                                                          IDyeingPrintingAreaSummaryRepository summaryRepo, IDyeingPrintingAreaInputProductionOrderRepository sppRepo)
        {
            var spMock = new Mock <IServiceProvider>();

            spMock.Setup(s => s.GetService(typeof(IDyeingPrintingAreaInputRepository)))
            .Returns(repository);

            spMock.Setup(s => s.GetService(typeof(IDyeingPrintingAreaMovementRepository)))
            .Returns(movementRepo);
            spMock.Setup(s => s.GetService(typeof(IDyeingPrintingAreaSummaryRepository)))
            .Returns(summaryRepo);
            spMock.Setup(s => s.GetService(typeof(IDyeingPrintingAreaInputProductionOrderRepository)))
            .Returns(sppRepo);

            return(spMock);
        }
 public FabricQualityControlService(IServiceProvider serviceProvider)
 {
     _repository      = serviceProvider.GetService <IFabricQualityControlRepository>();
     _dpSPPRepository = serviceProvider.GetService <IDyeingPrintingAreaInputProductionOrderRepository>();
     _fgtRepository   = serviceProvider.GetService <IFabricGradeTestRepository>();
 }
        public Mock <IServiceProvider> GetServiceProvider(IFabricQualityControlRepository service, IDyeingPrintingAreaInputProductionOrderRepository dpService,
                                                          IFabricGradeTestRepository fgtRepository)
        {
            var spMock = new Mock <IServiceProvider>();

            spMock.Setup(s => s.GetService(typeof(IFabricQualityControlRepository)))
            .Returns(service);

            spMock.Setup(s => s.GetService(typeof(IDyeingPrintingAreaInputProductionOrderRepository)))
            .Returns(dpService);
            spMock.Setup(s => s.GetService(typeof(IFabricGradeTestRepository)))
            .Returns(fgtRepository);
            return(spMock);
        }