private static void ConfigureAuctionShedulerService(IServiceCollection serviceCollection, TimeTaskServiceSettings timeTaskServiceSettings) { serviceCollection.AddSingleton <ITimeTaskClient>(provider => { var client = RestClient.For <ITimeTaskClient>(timeTaskServiceSettings.ConnectionString); client.ApiKey = timeTaskServiceSettings.ApiKey; return(client); } ); serviceCollection.AddSingleton <IAuctionSchedulerService, AuctionSchedulerService>(); }
private void SetupTimeTaskClient() { var timeTaskConnectionString = TestContextUtils.GetParameterOrDefault("quartz-web-task-service", "http://localhost:5001"); var auctionEchoTaskEndpoint = TestContextUtils.GetParameterOrDefault("quartz-web-task-target-endpoint", "http://host.docker.internal:9998/test"); TimetaskServiceSettings = new TimeTaskServiceSettings() { ConnectionString = timeTaskConnectionString, AuctionEndEchoTaskEndpoint = auctionEchoTaskEndpoint, ApiKey = "testk" }; TimeTaskClient = RestClient.For <ITimeTaskClient>(TimetaskServiceSettings.ConnectionString); SchedulerService = new AuctionSchedulerService(TimeTaskClient, TimetaskServiceSettings); }
private static void ConfigureServiceSettings( IServiceCollection serviceCollection, MsSqlConnectionSettings sqlServerConnectionSettings, RabbitMqSettings rabbitMqSettings, TimeTaskServiceSettings timeTaskServiceSettings, ImageDbSettings imageDbSettings, UserAuthDbContextOptions userAuthDbContextOptions, CategoryNameServiceSettings categoryNameServiceSettings) { serviceCollection.AddSingleton(sqlServerConnectionSettings); serviceCollection.AddSingleton(rabbitMqSettings); serviceCollection.AddSingleton(categoryNameServiceSettings); serviceCollection.AddSingleton(timeTaskServiceSettings); serviceCollection.AddSingleton(imageDbSettings); serviceCollection.AddSingleton(userAuthDbContextOptions); }
public static void Configure <UserIdentityServiceImplT, AuctionCreateSessionServiceImplT, ResetLinkSenderServiceImplT>( IServiceCollection serviceCollection, MsSqlConnectionSettings eventStoreConnectionSettings, RabbitMqSettings rabbitMqSettings, TimeTaskServiceSettings timeTaskServiceSettings, ImageDbSettings imageDbSettings, UserAuthDbContextOptions userAuthDbContextOptions, CategoryNameServiceSettings categoryNameServiceSettings ) where UserIdentityServiceImplT : class, IUserIdentityService where AuctionCreateSessionServiceImplT : class, IAuctionCreateSessionService where ResetLinkSenderServiceImplT : class, IResetLinkSenderService { ConfigureServiceSettings(serviceCollection, eventStoreConnectionSettings, rabbitMqSettings, timeTaskServiceSettings, imageDbSettings, userAuthDbContextOptions, categoryNameServiceSettings); ConfigureAuthDbServices(serviceCollection); ConfigureUserIdentitySessionService <UserIdentityServiceImplT>(serviceCollection); ConfigureAuctionCreateSessionService <AuctionCreateSessionServiceImplT>(serviceCollection); ConfigureImageServices(serviceCollection); ConfigureDomainRepositories(serviceCollection); ConfigureAuctionShedulerService(serviceCollection, timeTaskServiceSettings); ConfigureDecoratedCommandHandlers(serviceCollection); ConfigureResetLinkSenderService <ResetLinkSenderServiceImplT>(serviceCollection); serviceCollection.AddScoped <CreateAuctionCommandHandlerDepedencies>(); serviceCollection.AddSingleton <IHTTPQueuedCommandStatusStorage, HTTPMemQueuedCommandStatusStorage>(); serviceCollection.AddScoped <WSQueuedCommandHandler>(); serviceCollection.AddScoped <HTTPQueuedCommandHandler>(); serviceCollection.AddScoped <MediatRCommandHandlerMediator>(); serviceCollection.AddScoped <EventBusCommandHandlerMediator>(); serviceCollection.AddScoped <HTTPQueuedCommandHandlerMediator>(); serviceCollection.AddScoped <ImmediateCommandMediator>(); serviceCollection.AddScoped <WSQueuedCommandMediator>(); serviceCollection.AddScoped <HTTPQueuedCommandMediator>(); serviceCollection.AddScoped <HTTPQueuedCommandStatusService>(); }
public TestAuctionSchedulerService(ITimeTaskClient timeTaskClient, TimeTaskServiceSettings serviceSettings) : base(timeTaskClient, serviceSettings) { _serviceSettings = serviceSettings; }
public ApiKeyAuthenticationHandler(IOptionsMonitor <ApiKeyAuthenticationOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock, ILogger <ApiKeyAuthenticationHandler> logger2, TimeTaskServiceSettings taskServiceSettings, FeatureFlagsAuthorizationSettings featureFlagsAuthorizationSettings) : base(options, logger, encoder, clock) { _logger = logger2; _taskServiceSettings = taskServiceSettings; _featureFlagsAuthorizationSettings = featureFlagsAuthorizationSettings; }