Skip to content

Commit 1a5ecc4

Browse files
xingsy97vicancy
andauthored
Obsolete UseAzureSignalR (#1605)
* Obsolete `IApplicationBuilder.UseAzureSignalR`. Tell user Use `IApplicationBuilder.UseEndpoints()` instead Co-authored-by: Liangying.Wei <[email protected]>
1 parent 596d68e commit 1a5ecc4

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/Microsoft.Azure.SignalR/ApplicationBuilderExtensions.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ public static class AzureSignalRApplicationBuilderExtensions
1919
/// <param name="app">The <see cref="IApplicationBuilder"/>.</param>
2020
/// <param name="configure">A callback to configure the <see cref="ServiceRouteBuilder"/>.</param>
2121
/// <returns>The same instance of the <see cref="IApplicationBuilder"/> for chaining.</returns>
22+
#if !NETSTANDARD2_0
23+
[Obsolete("IApplicationBuilder.UseAzureSignalR is obsoleted, please use IApplicationBuilder.UseEndpoints() instead.")]
24+
#endif
2225
public static IApplicationBuilder UseAzureSignalR(this IApplicationBuilder app, Action<ServiceRouteBuilder> configure)
2326
{
2427
var marker = app.ApplicationServices.GetService<AzureSignalRMarkerService>();

test/Microsoft.Azure.SignalR.E2ETests/SignalR/TestStartup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public TestStartup(IConfiguration configuration)
2424

2525
public void Configure(IApplicationBuilder app)
2626
{
27-
app.UseAzureSignalR(configure =>
27+
app.UseEndpoints(configure =>
2828
{
2929
configure.MapHub<TestHub>($"/{nameof(TestHub)}");
3030
});

0 commit comments

Comments
 (0)