Пример #1
0
        public PaymentDispositionRecapService(IServiceProvider serviceProvider)
        {
            this.serviceProvider = serviceProvider;

            _recapRepository = serviceProvider.GetService <IGarmentShippingPaymentDispositionRecapRepository>();
            _paymentDispositionRepository = serviceProvider.GetService <IGarmentShippingPaymentDispositionRepository>();
            _invoiceRepository            = serviceProvider.GetService <IGarmentShippingInvoiceRepository>();
            _packingListRepository        = serviceProvider.GetService <IGarmentPackingListRepository>();
        }
        public Mock <IServiceProvider> GetServiceProvider(IGarmentShippingPaymentDispositionRepository repository)
        {
            HttpResponseMessage message = new HttpResponseMessage(System.Net.HttpStatusCode.OK);
            var spMock = new Mock <IServiceProvider>();

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

            return(spMock);
        }
        public Mock <IServiceProvider> GetServiceProvider(IGarmentShippingPaymentDispositionRepository repository)
        {
            var spMock = new Mock <IServiceProvider>();

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

            spMock.Setup(s => s.GetService(typeof(IIdentityProvider)))
            .Returns(new IdentityProvider());

            return(spMock);
        }
        public GarmentShippingPaymentDispositionService(IServiceProvider serviceProvider)
        {
            _repository = serviceProvider.GetService <IGarmentShippingPaymentDispositionRepository>();

            this.serviceProvider = serviceProvider;
        }
Пример #5
0
 public GarmentPaymentDispositionRecapReportService(IServiceProvider serviceProvider)
 {
     repository        = serviceProvider.GetService <IGarmentShippingPaymentDispositionRecapRepository>();
     payrepository     = serviceProvider.GetService <IGarmentShippingPaymentDispositionRepository>();
     _identityProvider = serviceProvider.GetService <IIdentityProvider>();
 }