Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Commit fe900f7

Browse filesBrowse files
khellangSteveSandersonMS
authored andcommitted
Use AddHttpContextAccessor method added in aspnet/HttpAbstractions#947
1 parent d466cdb commit fe900f7
Copy full SHA for fe900f7

File tree

Expand file treeCollapse file tree

1 file changed

+2
-8
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-8
lines changed
Open diff view settings
Collapse file

‎src/Microsoft.AspNetCore.SpaServices/Prerendering/PrerenderingServiceCollectionExtensions.cs‎

Copy file name to clipboardExpand all lines: src/Microsoft.AspNetCore.SpaServices/Prerendering/PrerenderingServiceCollectionExtensions.cs
+2-8Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.Text;
4-
using Microsoft.AspNetCore.Http;
5-
using Microsoft.AspNetCore.NodeServices;
6-
using Microsoft.AspNetCore.SpaServices.Prerendering;
7-
using Microsoft.Extensions.DependencyInjection.Extensions;
1+
using Microsoft.AspNetCore.SpaServices.Prerendering;
82

93
namespace Microsoft.Extensions.DependencyInjection
104
{
@@ -20,7 +14,7 @@ public static class PrerenderingServiceCollectionExtensions
2014
/// <param name="serviceCollection">The <see cref="IServiceCollection"/>.</param>
2115
public static void AddSpaPrerenderer(this IServiceCollection serviceCollection)
2216
{
23-
serviceCollection.TryAddSingleton<IHttpContextAccessor, HttpContextAccessor>();
17+
serviceCollection.AddHttpContextAccessor();
2418
serviceCollection.AddSingleton<ISpaPrerenderer, DefaultSpaPrerenderer>();
2519
}
2620
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.