Skip to content

Commit

Permalink
Feature - use scoped correlation accessors for each unique reques… (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
stijnmoreels authored Mar 24, 2020
1 parent 77489ae commit e195972
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ public static IServiceCollection AddCorrelation<TAccessor, TCorrelationInfo, TOp
Guard.NotNull(services, nameof(services));
Guard.NotNull(createCustomCorrelationAccessor, nameof(createCustomCorrelationAccessor));

services.AddSingleton<ICorrelationInfoAccessor<TCorrelationInfo>>(createCustomCorrelationAccessor);
services.AddSingleton<ICorrelationInfoAccessor>(serviceProvider =>
services.AddScoped<ICorrelationInfoAccessor<TCorrelationInfo>>(createCustomCorrelationAccessor);
services.AddScoped<ICorrelationInfoAccessor>(serviceProvider =>
{
return new CorrelationInfoAccessorProxy<TCorrelationInfo>(
serviceProvider.GetRequiredService<ICorrelationInfoAccessor<TCorrelationInfo>>());
Expand Down

0 comments on commit e195972

Please sign in to comment.