Skip to content

Commit

Permalink
Use AddHttpContextAccessor method added in aspnet/HttpAbstractions#947
Browse files Browse the repository at this point in the history
  • Loading branch information
Kristian Hellang committed Oct 3, 2017
1 parent e3ce1f5 commit 97d2220
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/WebSites/BasicWebSite/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void ConfigureServices(IServiceCollection services)

services.AddLogging();
services.AddSingleton<IActionDescriptorProvider, ActionDescriptorCreationCounter>();
services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
services.AddHttpContextAccessor();
services.AddSingleton<ContactsRepository>();
services.AddSingleton<IErrorDescriptorProvider, VndErrorDescriptionProvider>();
services.AddScoped<RequestIdService>();
Expand Down
2 changes: 1 addition & 1 deletion test/WebSites/ControllersFromServicesWebSite/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void ConfigureServices(IServiceCollection services)

services.AddTransient<QueryValueService>();
services.AddTransient<ValueService>();
services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
services.AddHttpContextAccessor();
}

private class TypesPart : ApplicationPart, IApplicationPartTypeProvider
Expand Down

0 comments on commit 97d2220

Please sign in to comment.