Пример #1
0
        public CatalogController(ICatalogRepository repository, IOptionsSnapshot <CatalogSettings> settings, ICatalogIntegrationEventService catalogIntegrationEventService)
        {
            _catalogRepository = repository ?? throw new ArgumentNullException(nameof(repository));
            _catalogIntegrationEventService = catalogIntegrationEventService ?? throw new ArgumentNullException(nameof(catalogIntegrationEventService));

            _settings = settings.Value;
        }
 public CatalogController(CatalogContext context, IOptionsSnapshot <CatalogSettings> settings, ICatalogIntegrationEventService catalogIntegrationEventService)
 {
     _catalogContext = context ?? throw new ArgumentNullException(nameof(context));
     _catalogIntegrationEventService = catalogIntegrationEventService ?? throw new ArgumentNullException(nameof(catalogIntegrationEventService));
     _settings = settings.Value;
     context.ChangeTracker.QueryTrackingBehavior = QueryTrackingBehavior.NoTracking;
 }
Пример #3
0
        public CatalogController(CatalogContext catalogContext, ICatalogIntegrationEventService catalogIntegrationEventService, Serilog.ILogger logger)
        {
            _catalogContext = catalogContext ?? throw new ArgumentNullException(nameof(catalogContext));
            _catalogIntegrationEventService = catalogIntegrationEventService ?? throw new ArgumentNullException(nameof(catalogIntegrationEventService));

            catalogContext.ChangeTracker.QueryTrackingBehavior = QueryTrackingBehavior.NoTracking;
            _logger = logger ?? throw new ArgumentNullException(nameof(logger));
        }
Пример #4
0
        public CatalogController(CatalogContext Context, IOptionsSnapshot <Settings> settings, ICatalogIntegrationEventService catalogIntegrationEventService)
        {
            _catalogContext = Context;
            _catalogIntegrationEventService = catalogIntegrationEventService;
            _settings = settings;

            ((DbContext)Context).ChangeTracker.QueryTrackingBehavior = QueryTrackingBehavior.NoTracking;
        }
Пример #5
0
 public CatalogController(
     CatalogContext context,
     ICatalogIntegrationEventService catalogIntegrationEventService
     )
 {
     this._catalogContext            = context;
     _catalogIntegrationEventService = catalogIntegrationEventService;
 }
Пример #6
0
 public CatalogController(CatalogContext catalogContext,
                          ICatalogIntegrationEventService catalogIntegrationEventService,
                          ICatalogItemRatingService catalogItemRatingService)
 {
     _catalogContext = catalogContext;
     _catalogIntegrationEventService = catalogIntegrationEventService;
     _catalogItemRatingService       = catalogItemRatingService;
 }
 public OrderStatusChangedToAwaitingValidationIntegrationEventHandler(
     CatalogContext catalogContext,
     ICatalogIntegrationEventService catalogIntegrationEventService,
     ILogger <OrderStatusChangedToAwaitingValidationIntegrationEventHandler> logger)
 {
     _catalogContext = catalogContext;
     _catalogIntegrationEventService = catalogIntegrationEventService;
     _logger = logger ?? throw new System.ArgumentNullException(nameof(logger));
 }
 public OrderStatusChangedToAwaitingValidationIntegrationEventHandler(
     CatalogContext catalogContext,
     ICatalogIntegrationEventService catalogIntegrationEventService,
     IEventBus eventBus)
 {
     _catalogContext = catalogContext;
     _catalogIntegrationEventService = catalogIntegrationEventService;
     _eventBus = eventBus;
 }
 public ProductController(CatalogContext catalogContext,
                          IFileUtility fileUtility, IOptionsSnapshot <CatalogSettings> settings, ICatalogIntegrationEventService catalogIntegrationEventService)
 {
     _catalogContext = catalogContext ??
                       throw new ArgumentNullException(nameof(catalogContext));
     _fileUtility = fileUtility;
     _catalogIntegrationEventService = catalogIntegrationEventService;
     _settings = settings.Value;
 }
 public BeverageTypesController(
     CatalogContext catalogContext,
     IOptionsSnapshot <CatalogSettings> settings,
     ICatalogIntegrationEventService catalogIntegrationEventService,
     IBeverageTypeService beverageTypeService)
 {
     this.catalogContext = catalogContext ?? throw new ArgumentNullException(nameof(catalogContext));;
     this.settings       = settings;
     this.catalogIntegrationEventService = catalogIntegrationEventService ?? throw new ArgumentNullException(nameof(catalogIntegrationEventService));
     this.beverageTypeService            = beverageTypeService;
 }
Пример #11
0
 public CatalogController(CatalogContext catalogContext, IEventBus eventBus,
                          ICatalogIntegrationEventService catalogIntegrationEventService,
                          IIntegrationEventLogService integrationEventLogService,
                          ISearchRepository <CatalogItem> searchRepository)
 {
     this._catalogContext            = catalogContext;
     this._eventBus                  = eventBus;
     _catalogIntegrationEventService = catalogIntegrationEventService;
     _integrationEventLogService     = integrationEventLogService;
     this.searchRepository           = searchRepository;;
 }
Пример #12
0
 public OrderStatusChangedToPaidIntegrationEventHandler(CatalogContext catalogContext,
                                                        ICatalogIntegrationEventService catalogIntegrationEventService)
 {
     _catalogContext = catalogContext;
 }
Пример #13
0
 public OfferController(CatalogContext context, ICatalogIntegrationEventService catalogIntegrationEventService)
 {
     _catalogContext = context ?? throw new ArgumentNullException(nameof(context));
     _catalogIntegrationEventService             = catalogIntegrationEventService ?? throw new ArgumentNullException(nameof(catalogIntegrationEventService));
     context.ChangeTracker.QueryTrackingBehavior = QueryTrackingBehavior.NoTracking;
 }
 public CatalogItemsController(CatalogContext context, ICatalogIntegrationEventService catalogIntegrationEventService)
 {
     _context = context;
     this.catalogIntegrationEventService = catalogIntegrationEventService;
 }
Пример #15
0
 public HealthController(ICatalogIntegrationEventService catalogIntegrationEventService)
 {
     this._catalogIntegrationEventService = catalogIntegrationEventService;
 }
 public CarsCatalogController(CarCatalogDbContext carCatalogDbContext,
                              ICatalogIntegrationEventService catalogIntegrationEventService)
 {
     _carCatalogDbContext            = carCatalogDbContext;
     _catalogIntegrationEventService = catalogIntegrationEventService;
 }
Пример #17
0
        public UnitTest1()
        {
            var container = StartupConfig.GetConfiguredContainer();

            _service = container.GetService <ICatalogIntegrationEventService>();
        }