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

Commit 33cc640

Browse filesBrowse files
Remove obsolete 1.x APIs
1 parent baae621 commit 33cc640
Copy full SHA for 33cc640

File tree

Expand file treeCollapse file tree

10 files changed

+11
-112
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

10 files changed

+11
-112
lines changed
Open diff view settings
Collapse file

‎samples/misc/NodeServicesExamples/Startup.cs‎

Copy file name to clipboardExpand all lines: samples/misc/NodeServicesExamples/Startup.cs
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory, IHo
4141
});
4242

4343
app.UseStaticFiles();
44-
loggerFactory.AddConsole();
4544
app.UseMvc(routes =>
4645
{
4746
routes.MapRoute(
@@ -53,6 +52,11 @@ public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory, IHo
5352
public static void Main(string[] args)
5453
{
5554
var host = new WebHostBuilder()
55+
.ConfigureLogging(factory =>
56+
{
57+
factory.AddConsole();
58+
factory.AddDebug();
59+
})
5660
.UseContentRoot(Directory.GetCurrentDirectory())
5761
.UseIISIntegration()
5862
.UseKestrel()
Collapse file

‎samples/misc/Webpack/Clientside/PrerenderingSample.ts‎

Copy file name to clipboardExpand all lines: samples/misc/Webpack/Clientside/PrerenderingSample.ts
-17Lines changed: 0 additions & 17 deletions
This file was deleted.
Collapse file

‎samples/misc/Webpack/Controllers/FullPagePrerenderingController.cs‎

Copy file name to clipboardExpand all lines: samples/misc/Webpack/Controllers/FullPagePrerenderingController.cs
-25Lines changed: 0 additions & 25 deletions
This file was deleted.
Collapse file

‎samples/misc/Webpack/Startup.cs‎

Copy file name to clipboardExpand all lines: samples/misc/Webpack/Startup.cs
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory, IHo
3232
});
3333

3434
app.UseStaticFiles();
35-
loggerFactory.AddConsole();
3635
app.UseMvc(routes =>
3736
{
3837
routes.MapRoute(
@@ -44,6 +43,11 @@ public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory, IHo
4443
public static void Main(string[] args)
4544
{
4645
var host = new WebHostBuilder()
46+
.ConfigureLogging(factory =>
47+
{
48+
factory.AddConsole();
49+
factory.AddDebug();
50+
})
4751
.UseContentRoot(Directory.GetCurrentDirectory())
4852
.UseIISIntegration()
4953
.UseKestrel()
Collapse file

‎samples/misc/Webpack/Views/Home/Index.cshtml‎

Copy file name to clipboardExpand all lines: samples/misc/Webpack/Views/Home/Index.cshtml
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
<h1>Hello</h1>
66
Hi there. Enter some text: <input />
77

8-
<hr />
9-
See also: <a asp-controller='FullPagePrerendering'>Full-page prerendering example</a>
10-
118
@section scripts {
129
<script src="dist/main.js"></script>
1310
}
Collapse file

‎src/Microsoft.AspNetCore.NodeServices/Configuration/NodeServicesServiceCollectionExtensions.cs‎

Copy file name to clipboardExpand all lines: src/Microsoft.AspNetCore.NodeServices/Configuration/NodeServicesServiceCollectionExtensions.cs
-14Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,6 @@ public static class NodeServicesServiceCollectionExtensions
1515
public static void AddNodeServices(this IServiceCollection serviceCollection)
1616
=> AddNodeServices(serviceCollection, _ => {});
1717

18-
/// <summary>
19-
/// Adds NodeServices support to the <paramref name="serviceCollection"/>.
20-
/// </summary>
21-
/// <param name="serviceCollection">The <see cref="IServiceCollection"/>.</param>
22-
/// <param name="options">Options for configuring the <see cref="INodeServices"/> instances.</param>
23-
[Obsolete("Use the AddNodeServices(Action<NodeServicesOptions> setupAction) overload instead.")]
24-
public static void AddNodeServices(this IServiceCollection serviceCollection, NodeServicesOptions options)
25-
{
26-
serviceCollection.AddSingleton(typeof (INodeServices), _ =>
27-
{
28-
return NodeServicesFactory.CreateNodeServices(options);
29-
});
30-
}
31-
3218
/// <summary>
3319
/// Adds NodeServices support to the <paramref name="serviceCollection"/>.
3420
/// </summary>
Collapse file

‎src/Microsoft.AspNetCore.NodeServices/INodeServices.cs‎

Copy file name to clipboardExpand all lines: src/Microsoft.AspNetCore.NodeServices/INodeServices.cs
-21Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -50,26 +50,5 @@ public interface INodeServices : IDisposable
5050
/// <param name="args">Any sequence of JSON-serializable arguments to be passed to the Node.js function.</param>
5151
/// <returns>A <see cref="Task{TResult}"/> representing the completion of the RPC call.</returns>
5252
Task<T> InvokeExportAsync<T>(CancellationToken cancellationToken, string moduleName, string exportedFunctionName, params object[] args);
53-
54-
/// <summary>
55-
/// Asynchronously invokes code in the Node.js instance.
56-
/// </summary>
57-
/// <typeparam name="T">The JSON-serializable data type that the Node.js code will asynchronously return.</typeparam>
58-
/// <param name="moduleName">The path to the Node.js module (i.e., JavaScript file) relative to your project root whose default CommonJS export is the function to be invoked.</param>
59-
/// <param name="args">Any sequence of JSON-serializable arguments to be passed to the Node.js function.</param>
60-
/// <returns>A <see cref="Task{TResult}"/> representing the completion of the RPC call.</returns>
61-
[Obsolete("Use InvokeAsync instead")]
62-
Task<T> Invoke<T>(string moduleName, params object[] args);
63-
64-
/// <summary>
65-
/// Asynchronously invokes code in the Node.js instance.
66-
/// </summary>
67-
/// <typeparam name="T">The JSON-serializable data type that the Node.js code will asynchronously return.</typeparam>
68-
/// <param name="moduleName">The path to the Node.js module (i.e., JavaScript file) relative to your project root that contains the code to be invoked.</param>
69-
/// <param name="exportedFunctionName">Specifies the CommonJS export to be invoked.</param>
70-
/// <param name="args">Any sequence of JSON-serializable arguments to be passed to the Node.js function.</param>
71-
/// <returns>A <see cref="Task{TResult}"/> representing the completion of the RPC call.</returns>
72-
[Obsolete("Use InvokeExportAsync instead")]
73-
Task<T> InvokeExport<T>(string moduleName, string exportedFunctionName, params object[] args);
7453
}
7554
}
Collapse file

‎src/Microsoft.AspNetCore.NodeServices/NodeServicesImpl.cs‎

Copy file name to clipboardExpand all lines: src/Microsoft.AspNetCore.NodeServices/NodeServicesImpl.cs
-12Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -161,17 +161,5 @@ private INodeInstance CreateNewNodeInstance()
161161
{
162162
return _nodeInstanceFactory();
163163
}
164-
165-
// Obsolete method - will be removed soon
166-
public Task<T> Invoke<T>(string moduleName, params object[] args)
167-
{
168-
return InvokeAsync<T>(moduleName, args);
169-
}
170-
171-
// Obsolete method - will be removed soon
172-
public Task<T> InvokeExport<T>(string moduleName, string exportedFunctionName, params object[] args)
173-
{
174-
return InvokeExportAsync<T>(moduleName, exportedFunctionName, args);
175-
}
176164
}
177165
}
Collapse file

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

Copy file name to clipboardExpand all lines: src/Microsoft.AspNetCore.SpaServices/Prerendering/JavaScriptModuleExport.cs
-6Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,5 @@ public JavaScriptModuleExport(string moduleName)
2626
/// If not set, the JavaScript module's default CommonJS export must itself be the prerendering function.
2727
/// </summary>
2828
public string ExportName { get; set; }
29-
30-
/// <summary>
31-
/// Obsolete. Do not use. Instead, configure Webpack to build a Node.js-compatible bundle and reference that directly.
32-
/// </summary>
33-
[Obsolete("Do not use. This feature will be removed. Instead, configure Webpack to build a Node.js-compatible bundle and reference that directly.")]
34-
public string WebpackConfig { get; set; }
3529
}
3630
}
Collapse file

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

Copy file name to clipboardExpand all lines: src/Microsoft.AspNetCore.SpaServices/Prerendering/PrerenderTagHelper.cs
+1-12Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ public class PrerenderTagHelper : TagHelper
1919
{
2020
private const string PrerenderModuleAttributeName = "asp-prerender-module";
2121
private const string PrerenderExportAttributeName = "asp-prerender-export";
22-
private const string PrerenderWebpackConfigAttributeName = "asp-prerender-webpack-config";
2322
private const string PrerenderDataAttributeName = "asp-prerender-data";
2423
private const string PrerenderTimeoutAttributeName = "asp-prerender-timeout";
2524
private static INodeServices _fallbackNodeServices; // Used only if no INodeServices was registered with DI
@@ -59,13 +58,6 @@ public PrerenderTagHelper(IServiceProvider serviceProvider)
5958
[HtmlAttributeName(PrerenderExportAttributeName)]
6059
public string ExportName { get; set; }
6160

62-
/// <summary>
63-
/// Obsolete. Do not use. Instead, configure Webpack to build a Node.js-compatible bundle and reference that directly.
64-
/// </summary>
65-
[Obsolete("Do not use. This feature will be removed. Instead, configure Webpack to build a Node.js-compatible bundle and reference that directly.")]
66-
[HtmlAttributeName(PrerenderWebpackConfigAttributeName)]
67-
public string WebpackConfigPath { get; set; }
68-
6961
/// <summary>
7062
/// An optional JSON-serializable parameter to be supplied to the prerendering code.
7163
/// </summary>
@@ -111,10 +103,7 @@ public override async Task ProcessAsync(TagHelperContext context, TagHelperOutpu
111103
_nodeServices,
112104
new JavaScriptModuleExport(ModuleName)
113105
{
114-
ExportName = ExportName,
115-
#pragma warning disable CS0618 // Type or member is obsolete
116-
WebpackConfig = WebpackConfigPath
117-
#pragma warning restore CS0618 // Type or member is obsolete
106+
ExportName = ExportName
118107
},
119108
unencodedAbsoluteUrl,
120109
unencodedPathAndQuery,

0 commit comments

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