@@ -61,7 +61,9 @@ public IServiceProvider ConfigureServices(IServiceCollection services)
6161 . AddCustomAuthentication ( Configuration )
6262 . AddSingleton < IHttpContextAccessor , HttpContextAccessor > ( )
6363 . AddTransient < IIdentityService , IdentityService > ( )
64- . AddTransient < IGrantUrlTesterService , GrantUrlTesterService > ( ) ;
64+ . AddTransient < IGrantUrlTesterService , GrantUrlTesterService > ( )
65+ . AddTransient < IWebhooksRetriever , WebhooksRetriever > ( )
66+ . AddTransient < IWebhooksSender , WebhooksSender > ( ) ;
6567
6668 var container = new ContainerBuilder ( ) ;
6769 container . Populate ( services ) ;
@@ -125,6 +127,7 @@ protected virtual void ConfigureEventBus(IApplicationBuilder app)
125127 {
126128 var eventBus = app . ApplicationServices . GetRequiredService < IEventBus > ( ) ;
127129 eventBus . Subscribe < ProductPriceChangedIntegrationEvent , ProductPriceChangedIntegrationEventHandler > ( ) ;
130+ eventBus . Subscribe < OrderStatusChangedToShippedIntegrationEvent , OrderStatusChangedToShippedIntegrationEventHandler > ( ) ;
128131 }
129132 }
130133
@@ -287,19 +290,11 @@ public static IServiceCollection AddCustomHealthCheck(this IServiceCollection se
287290 public static IServiceCollection AddHttpClientServices ( this IServiceCollection services , IConfiguration configuration )
288291 {
289292 services . AddSingleton < IHttpContextAccessor , HttpContextAccessor > ( ) ;
290-
291-
292- //register delegating handlers
293- //services.AddTransient<HttpClientAuthorizationDelegatingHandler>();
294-
295- //InfinteTimeSpan -> See: https://github.com/aspnet/HttpClientFactory/issues/194
296293 services . AddHttpClient ( "extendedhandlerlifetime" ) . SetHandlerLifetime ( Timeout . InfiniteTimeSpan ) ;
297-
298294 //add http client services
299295 services . AddHttpClient ( "GrantClient" )
300296 . SetHandlerLifetime ( TimeSpan . FromMinutes ( 5 ) ) ;
301297 //.AddHttpMessageHandler<HttpClientAuthorizationDelegatingHandler>();
302-
303298 return services ;
304299 }
305300
0 commit comments