Skip to content

Commit 14f17fa

Browse files
Obsolete Microsoft.AspNetCore.SpaServices and Microsoft.AspNetCore.No… (#12892)
Obsolete Microsoft.AspNetCore.SpaServices and Microsoft.AspNetCore.NodeServices
1 parent 3ab8ebf commit 14f17fa

File tree

64 files changed

+324
-618
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+324
-618
lines changed

src/Middleware/Middleware.sln

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.NodeSe
255255
EndProject
256256
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SpaServices", "SpaServices", "{D6FA4ABE-E685-4EDD-8B06-D8777E76B472}"
257257
EndProject
258-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Webpack", "SpaServices\samples\Webpack\Webpack.csproj", "{121DFA13-E965-4C91-A175-19EF20DFD5AC}"
259-
EndProject
260258
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.SpaServices", "SpaServices\src\Microsoft.AspNetCore.SpaServices.csproj", "{D9D02772-1D53-45C3-B2CC-888F9978958C}"
261259
EndProject
262260
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.SpaServices.Extensions", "SpaServices.Extensions\src\Microsoft.AspNetCore.SpaServices.Extensions.csproj", "{5D5B7E54-9323-498A-8983-E9BDFA3B2D07}"
@@ -297,6 +295,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestOrigin", "CORS\test\tes
297295
EndProject
298296
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore", "..\DefaultBuilder\src\Microsoft.AspNetCore.csproj", "{46B4FE62-06A1-4D54-B3E8-D8B4B3560075}"
299297
EndProject
298+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Server.IntegrationTesting.IIS", "..\Servers\IIS\IntegrationTesting.IIS\src\Microsoft.AspNetCore.Server.IntegrationTesting.IIS.csproj", "{92E11EBB-759E-4DA8-AB61-A9977D9F97D0}"
299+
EndProject
300+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.SpaServices.Extensions.Tests", "SpaServices.Extensions\test\Microsoft.AspNetCore.SpaServices.Extensions.Tests.csproj", "{D0CB733B-4CE8-4F6C-BBB9-548EA1A96966}"
301+
EndProject
300302
Global
301303
GlobalSection(SolutionConfigurationPlatforms) = preSolution
302304
Debug|Any CPU = Debug|Any CPU
@@ -1423,18 +1425,6 @@ Global
14231425
{40951683-DBC4-437A-BBAB-2FA7147E11EA}.Release|x64.Build.0 = Release|Any CPU
14241426
{40951683-DBC4-437A-BBAB-2FA7147E11EA}.Release|x86.ActiveCfg = Release|Any CPU
14251427
{40951683-DBC4-437A-BBAB-2FA7147E11EA}.Release|x86.Build.0 = Release|Any CPU
1426-
{121DFA13-E965-4C91-A175-19EF20DFD5AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
1427-
{121DFA13-E965-4C91-A175-19EF20DFD5AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
1428-
{121DFA13-E965-4C91-A175-19EF20DFD5AC}.Debug|x64.ActiveCfg = Debug|Any CPU
1429-
{121DFA13-E965-4C91-A175-19EF20DFD5AC}.Debug|x64.Build.0 = Debug|Any CPU
1430-
{121DFA13-E965-4C91-A175-19EF20DFD5AC}.Debug|x86.ActiveCfg = Debug|Any CPU
1431-
{121DFA13-E965-4C91-A175-19EF20DFD5AC}.Debug|x86.Build.0 = Debug|Any CPU
1432-
{121DFA13-E965-4C91-A175-19EF20DFD5AC}.Release|Any CPU.ActiveCfg = Release|Any CPU
1433-
{121DFA13-E965-4C91-A175-19EF20DFD5AC}.Release|Any CPU.Build.0 = Release|Any CPU
1434-
{121DFA13-E965-4C91-A175-19EF20DFD5AC}.Release|x64.ActiveCfg = Release|Any CPU
1435-
{121DFA13-E965-4C91-A175-19EF20DFD5AC}.Release|x64.Build.0 = Release|Any CPU
1436-
{121DFA13-E965-4C91-A175-19EF20DFD5AC}.Release|x86.ActiveCfg = Release|Any CPU
1437-
{121DFA13-E965-4C91-A175-19EF20DFD5AC}.Release|x86.Build.0 = Release|Any CPU
14381428
{D9D02772-1D53-45C3-B2CC-888F9978958C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
14391429
{D9D02772-1D53-45C3-B2CC-888F9978958C}.Debug|Any CPU.Build.0 = Debug|Any CPU
14401430
{D9D02772-1D53-45C3-B2CC-888F9978958C}.Debug|x64.ActiveCfg = Debug|Any CPU
@@ -1627,6 +1617,30 @@ Global
16271617
{46B4FE62-06A1-4D54-B3E8-D8B4B3560075}.Release|x64.Build.0 = Release|Any CPU
16281618
{46B4FE62-06A1-4D54-B3E8-D8B4B3560075}.Release|x86.ActiveCfg = Release|Any CPU
16291619
{46B4FE62-06A1-4D54-B3E8-D8B4B3560075}.Release|x86.Build.0 = Release|Any CPU
1620+
{92E11EBB-759E-4DA8-AB61-A9977D9F97D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
1621+
{92E11EBB-759E-4DA8-AB61-A9977D9F97D0}.Debug|Any CPU.Build.0 = Debug|Any CPU
1622+
{92E11EBB-759E-4DA8-AB61-A9977D9F97D0}.Debug|x64.ActiveCfg = Debug|Any CPU
1623+
{92E11EBB-759E-4DA8-AB61-A9977D9F97D0}.Debug|x64.Build.0 = Debug|Any CPU
1624+
{92E11EBB-759E-4DA8-AB61-A9977D9F97D0}.Debug|x86.ActiveCfg = Debug|Any CPU
1625+
{92E11EBB-759E-4DA8-AB61-A9977D9F97D0}.Debug|x86.Build.0 = Debug|Any CPU
1626+
{92E11EBB-759E-4DA8-AB61-A9977D9F97D0}.Release|Any CPU.ActiveCfg = Release|Any CPU
1627+
{92E11EBB-759E-4DA8-AB61-A9977D9F97D0}.Release|Any CPU.Build.0 = Release|Any CPU
1628+
{92E11EBB-759E-4DA8-AB61-A9977D9F97D0}.Release|x64.ActiveCfg = Release|Any CPU
1629+
{92E11EBB-759E-4DA8-AB61-A9977D9F97D0}.Release|x64.Build.0 = Release|Any CPU
1630+
{92E11EBB-759E-4DA8-AB61-A9977D9F97D0}.Release|x86.ActiveCfg = Release|Any CPU
1631+
{92E11EBB-759E-4DA8-AB61-A9977D9F97D0}.Release|x86.Build.0 = Release|Any CPU
1632+
{D0CB733B-4CE8-4F6C-BBB9-548EA1A96966}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
1633+
{D0CB733B-4CE8-4F6C-BBB9-548EA1A96966}.Debug|Any CPU.Build.0 = Debug|Any CPU
1634+
{D0CB733B-4CE8-4F6C-BBB9-548EA1A96966}.Debug|x64.ActiveCfg = Debug|Any CPU
1635+
{D0CB733B-4CE8-4F6C-BBB9-548EA1A96966}.Debug|x64.Build.0 = Debug|Any CPU
1636+
{D0CB733B-4CE8-4F6C-BBB9-548EA1A96966}.Debug|x86.ActiveCfg = Debug|Any CPU
1637+
{D0CB733B-4CE8-4F6C-BBB9-548EA1A96966}.Debug|x86.Build.0 = Debug|Any CPU
1638+
{D0CB733B-4CE8-4F6C-BBB9-548EA1A96966}.Release|Any CPU.ActiveCfg = Release|Any CPU
1639+
{D0CB733B-4CE8-4F6C-BBB9-548EA1A96966}.Release|Any CPU.Build.0 = Release|Any CPU
1640+
{D0CB733B-4CE8-4F6C-BBB9-548EA1A96966}.Release|x64.ActiveCfg = Release|Any CPU
1641+
{D0CB733B-4CE8-4F6C-BBB9-548EA1A96966}.Release|x64.Build.0 = Release|Any CPU
1642+
{D0CB733B-4CE8-4F6C-BBB9-548EA1A96966}.Release|x86.ActiveCfg = Release|Any CPU
1643+
{D0CB733B-4CE8-4F6C-BBB9-548EA1A96966}.Release|x86.Build.0 = Release|Any CPU
16301644
EndGlobalSection
16311645
GlobalSection(SolutionProperties) = preSolution
16321646
HideSolutionNode = FALSE
@@ -1736,7 +1750,6 @@ Global
17361750
{47B6636D-09A3-47AE-9303-9F5D15EEE9D8} = {ACA6DDB9-7592-47CE-A740-D15BF307E9E0}
17371751
{C801B6A3-906F-406F-BA25-EAE0B4BCE5C9} = {17B409B3-7EC6-49D8-847E-CFAA319E01B5}
17381752
{40951683-DBC4-437A-BBAB-2FA7147E11EA} = {17B409B3-7EC6-49D8-847E-CFAA319E01B5}
1739-
{121DFA13-E965-4C91-A175-19EF20DFD5AC} = {D6FA4ABE-E685-4EDD-8B06-D8777E76B472}
17401753
{D9D02772-1D53-45C3-B2CC-888F9978958C} = {D6FA4ABE-E685-4EDD-8B06-D8777E76B472}
17411754
{5D5B7E54-9323-498A-8983-E9BDFA3B2D07} = {D6FA4ABE-E685-4EDD-8B06-D8777E76B472}
17421755
{B04E9CB6-0D1C-4C21-B626-89B6926A491F} = {17B409B3-7EC6-49D8-847E-CFAA319E01B5}
@@ -1755,6 +1768,8 @@ Global
17551768
{DFEB537A-2D35-4C62-8A13-42798DF66A80} = {BD7B3AD8-0BA6-405F-8CF6-24B9464D4B5B}
17561769
{E0521105-3A7B-480B-B962-0BFC2838D919} = {BD7B3AD8-0BA6-405F-8CF6-24B9464D4B5B}
17571770
{46B4FE62-06A1-4D54-B3E8-D8B4B3560075} = {ACA6DDB9-7592-47CE-A740-D15BF307E9E0}
1771+
{92E11EBB-759E-4DA8-AB61-A9977D9F97D0} = {ACA6DDB9-7592-47CE-A740-D15BF307E9E0}
1772+
{D0CB733B-4CE8-4F6C-BBB9-548EA1A96966} = {D6FA4ABE-E685-4EDD-8B06-D8777E76B472}
17581773
EndGlobalSection
17591774
GlobalSection(ExtensibilityGlobals) = postSolution
17601775
SolutionGuid = {83786312-A93B-4BB4-AB06-7C6913A59AFA}

src/Middleware/NodeServices/ref/Microsoft.AspNetCore.NodeServices.netcoreapp3.0.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,27 @@
33

44
namespace Microsoft.AspNetCore.NodeServices
55
{
6+
[System.ObsoleteAttribute("Use Microsoft.AspNetCore.SpaServices.Extensions")]
67
public static partial class EmbeddedResourceReader
78
{
9+
[System.ObsoleteAttribute("Use Microsoft.AspNetCore.SpaServices.Extensions")]
810
public static string Read(System.Type assemblyContainingType, string path) { throw null; }
911
}
12+
[System.ObsoleteAttribute("Use Microsoft.AspNetCore.SpaServices.Extensions")]
1013
public partial interface INodeServices : System.IDisposable
1114
{
1215
System.Threading.Tasks.Task<T> InvokeAsync<T>(string moduleName, params object[] args);
1316
System.Threading.Tasks.Task<T> InvokeAsync<T>(System.Threading.CancellationToken cancellationToken, string moduleName, params object[] args);
1417
System.Threading.Tasks.Task<T> InvokeExportAsync<T>(string moduleName, string exportedFunctionName, params object[] args);
1518
System.Threading.Tasks.Task<T> InvokeExportAsync<T>(System.Threading.CancellationToken cancellationToken, string moduleName, string exportedFunctionName, params object[] args);
1619
}
20+
[System.ObsoleteAttribute("Use Microsoft.AspNetCore.SpaServices.Extensions")]
1721
public static partial class NodeServicesFactory
1822
{
23+
[System.ObsoleteAttribute("Use Microsoft.AspNetCore.SpaServices.Extensions")]
1924
public static Microsoft.AspNetCore.NodeServices.INodeServices CreateNodeServices(Microsoft.AspNetCore.NodeServices.NodeServicesOptions options) { throw null; }
2025
}
26+
[System.ObsoleteAttribute("Use Microsoft.AspNetCore.SpaServices.Extensions")]
2127
public partial class NodeServicesOptions
2228
{
2329
public NodeServicesOptions(System.IServiceProvider serviceProvider) { }
@@ -31,6 +37,7 @@ public NodeServicesOptions(System.IServiceProvider serviceProvider) { }
3137
public string ProjectPath { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
3238
public string[] WatchFileExtensions { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
3339
}
40+
[System.ObsoleteAttribute("Use Microsoft.AspNetCore.SpaServices.Extensions")]
3441
public sealed partial class StringAsTempFile : System.IDisposable
3542
{
3643
public StringAsTempFile(string content, System.Threading.CancellationToken applicationStoppingToken) { }
@@ -41,28 +48,34 @@ public void Dispose() { }
4148
}
4249
namespace Microsoft.AspNetCore.NodeServices.HostingModels
4350
{
51+
[System.ObsoleteAttribute("Use Microsoft.AspNetCore.SpaServices.Extensions")]
4452
public partial interface INodeInstance : System.IDisposable
4553
{
4654
System.Threading.Tasks.Task<T> InvokeExportAsync<T>(System.Threading.CancellationToken cancellationToken, string moduleName, string exportNameOrNull, params object[] args);
4755
}
56+
[System.ObsoleteAttribute("Use Microsoft.AspNetCore.SpaServices.Extensions")]
4857
public partial class NodeInvocationException : System.Exception
4958
{
5059
public NodeInvocationException(string message, string details) { }
5160
public NodeInvocationException(string message, string details, bool nodeInstanceUnavailable, bool allowConnectionDraining) { }
5261
public bool AllowConnectionDraining { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
5362
public bool NodeInstanceUnavailable { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
5463
}
64+
[System.ObsoleteAttribute("Use Microsoft.AspNetCore.SpaServices.Extensions")]
5565
public partial class NodeInvocationInfo
5666
{
5767
public NodeInvocationInfo() { }
5868
public object[] Args { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
5969
public string ExportedFunctionName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
6070
public string ModuleName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
6171
}
72+
[System.ObsoleteAttribute("Use Microsoft.AspNetCore.SpaServices.Extensions")]
6273
public static partial class NodeServicesOptionsExtensions
6374
{
75+
[System.ObsoleteAttribute("Use Microsoft.AspNetCore.SpaServices.Extensions")]
6476
public static void UseHttpHosting(this Microsoft.AspNetCore.NodeServices.NodeServicesOptions options) { }
6577
}
78+
[System.ObsoleteAttribute("Use Microsoft.AspNetCore.SpaServices.Extensions")]
6679
public abstract partial class OutOfProcessNodeInstance : Microsoft.AspNetCore.NodeServices.HostingModels.INodeInstance, System.IDisposable
6780
{
6881
protected readonly Microsoft.Extensions.Logging.ILogger OutputLogger;
@@ -80,9 +93,12 @@ protected virtual void OnOutputDataReceived(string outputData) { }
8093
}
8194
namespace Microsoft.Extensions.DependencyInjection
8295
{
96+
[System.ObsoleteAttribute("Use Microsoft.AspNetCore.SpaServices.Extensions")]
8397
public static partial class NodeServicesServiceCollectionExtensions
8498
{
99+
[System.ObsoleteAttribute("Use Microsoft.AspNetCore.SpaServices.Extensions")]
85100
public static void AddNodeServices(this Microsoft.Extensions.DependencyInjection.IServiceCollection serviceCollection) { }
101+
[System.ObsoleteAttribute("Use Microsoft.AspNetCore.SpaServices.Extensions")]
86102
public static void AddNodeServices(this Microsoft.Extensions.DependencyInjection.IServiceCollection serviceCollection, System.Action<Microsoft.AspNetCore.NodeServices.NodeServicesOptions> setupAction) { }
87103
}
88104
}

src/Middleware/NodeServices/samples/NodeServicesExamples/Controllers/HomeController.cs

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
// Copyright (c) .NET Foundation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
14
using System.Threading.Tasks;
25
using Microsoft.AspNetCore.Mvc;
36
using Microsoft.AspNetCore.NodeServices;
4-
using Microsoft.AspNetCore.SpaServices.Prerendering;
57

68
namespace NodeServicesExamples.Controllers
79
{
@@ -17,7 +19,9 @@ public IActionResult ES2015Transpilation()
1719
return View();
1820
}
1921

22+
#pragma warning disable 0618
2023
public async Task<IActionResult> Chart([FromServices] INodeServices nodeServices)
24+
#pragma warning restore 0618
2125
{
2226
var options = new { width = 400, height = 200, showArea = true, showPoint = true, fullWidth = true };
2327
var data = new
@@ -35,20 +39,6 @@ public async Task<IActionResult> Chart([FromServices] INodeServices nodeServices
3539
return View();
3640
}
3741

38-
public async Task<IActionResult> Prerendering([FromServices] ISpaPrerenderer prerenderer)
39-
{
40-
var result = await prerenderer.RenderToString("./Node/prerenderPage");
41-
42-
if (!string.IsNullOrEmpty(result.RedirectUrl))
43-
{
44-
return Redirect(result.RedirectUrl);
45-
}
46-
47-
ViewData["PrerenderedHtml"] = result.Html;
48-
ViewData["PrerenderedGlobals"] = result.CreateGlobalsAssignmentScript();
49-
return View();
50-
}
51-
5242
public IActionResult Error()
5343
{
5444
return View("~/Views/Shared/Error.cshtml");

src/Middleware/NodeServices/samples/NodeServicesExamples/NodeServicesExamples.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<Reference Include="Microsoft.AspNetCore.Mvc" />
11-
<Reference Include="Microsoft.AspNetCore.SpaServices" />
10+
<Reference Include="Microsoft.AspNetCore.Mvc" />
1211
<Reference Include="Microsoft.AspNetCore.Diagnostics" />
1312
<Reference Include="Microsoft.AspNetCore.Hosting" />
13+
<Reference Include="Microsoft.AspNetCore.NodeServices" />
1414
<Reference Include="Microsoft.AspNetCore.Server.IISIntegration" />
1515
<Reference Include="Microsoft.AspNetCore.Server.Kestrel" />
1616
<Reference Include="Microsoft.AspNetCore.StaticFiles" />
1717
<Reference Include="Microsoft.Extensions.Logging.Debug" />
18+
<Reference Include="Microsoft.Extensions.Logging.Console" />
1819
</ItemGroup>
1920

2021
<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">

src/Middleware/NodeServices/samples/NodeServicesExamples/Startup.cs

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
1+
// Copyright (c) .NET Foundation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
4+
using System;
5+
using System.IO;
16
using Microsoft.AspNetCore.Builder;
27
using Microsoft.AspNetCore.Hosting;
38
using Microsoft.AspNetCore.Http;
49
using Microsoft.AspNetCore.NodeServices;
510
using Microsoft.Extensions.DependencyInjection;
611
using Microsoft.Extensions.Logging;
7-
using System.IO;
812

913
namespace NodeServicesExamples
1014
{
1115
public class Startup
1216
{
17+
#pragma warning disable 0618
1318
// This method gets called by the runtime. Use this method to add services to the container.
1419
public void ConfigureServices(IServiceCollection services)
1520
{
1621
services.AddMvc();
1722

1823
// Enable Node Services
1924
services.AddNodeServices();
20-
services.AddSpaPrerenderer();
2125
}
2226

2327
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
@@ -26,11 +30,14 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, INodeSer
2630
app.UseDeveloperExceptionPage();
2731

2832
// Dynamically transpile any .js files under the '/js/' directory
29-
app.Use(next => async context => {
33+
app.Use(next => async context =>
34+
{
3035
var requestPath = context.Request.Path.Value;
31-
if (requestPath.StartsWith("/js/") && requestPath.EndsWith(".js")) {
36+
if (requestPath.StartsWith("/js/") && requestPath.EndsWith(".js"))
37+
{
3238
var fileInfo = env.WebRootFileProvider.GetFileInfo(requestPath);
33-
if (fileInfo.Exists) {
39+
if (fileInfo.Exists)
40+
{
3441
var transpiled = await nodeServices.InvokeAsync<string>("./Node/transpilation.js", fileInfo.PhysicalPath, requestPath);
3542
await context.Response.WriteAsync(transpiled);
3643
return;
@@ -49,6 +56,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, INodeSer
4956
endpoints.MapDefaultControllerRoute();
5057
});
5158
}
59+
#pragma warning restore 0618
5260

5361
public static void Main(string[] args)
5462
{

src/Middleware/NodeServices/src/Configuration/NodeServicesFactory.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
1+
// Copyright (c) .NET Foundation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
14
using System;
25

36
namespace Microsoft.AspNetCore.NodeServices
47
{
58
/// <summary>
69
/// Supplies INodeServices instances.
710
/// </summary>
11+
[Obsolete("Use Microsoft.AspNetCore.SpaServices.Extensions")]
812
public static class NodeServicesFactory
913
{
1014
/// <summary>
1115
/// Create an <see cref="INodeServices"/> instance according to the supplied options.
1216
/// </summary>
1317
/// <param name="options">Options for creating the <see cref="INodeServices"/> instance.</param>
1418
/// <returns>An <see cref="INodeServices"/> instance.</returns>
19+
[Obsolete("Use Microsoft.AspNetCore.SpaServices.Extensions")]
1520
public static INodeServices CreateNodeServices(NodeServicesOptions options)
1621
{
1722
if (options == null)
@@ -22,4 +27,4 @@ public static INodeServices CreateNodeServices(NodeServicesOptions options)
2227
return new NodeServicesImpl(options.NodeInstanceFactory);
2328
}
2429
}
25-
}
30+
}

src/Middleware/NodeServices/src/Configuration/NodeServicesOptions.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) .NET Foundation. All rights reserved.
2+
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3+
14
using System;
25
using System.Collections.Generic;
36
using System.IO;
@@ -14,6 +17,7 @@ namespace Microsoft.AspNetCore.NodeServices
1417
/// <summary>
1518
/// Describes options used to configure an <see cref="INodeServices"/> instance.
1619
/// </summary>
20+
[Obsolete("Use Microsoft.AspNetCore.SpaServices.Extensions")]
1721
public class NodeServicesOptions
1822
{
1923
internal const string TimeoutConfigPropertyName = nameof(InvocationTimeoutMilliseconds);

0 commit comments

Comments
 (0)