diff --git a/src/Azure/AzureAppServicesIntegration/src/AppServicesWebHostBuilderExtensions.cs b/src/Azure/AzureAppServicesIntegration/src/AppServicesWebHostBuilderExtensions.cs
index 09a51bf56dbc..ed5c39561e3f 100644
--- a/src/Azure/AzureAppServicesIntegration/src/AppServicesWebHostBuilderExtensions.cs
+++ b/src/Azure/AzureAppServicesIntegration/src/AppServicesWebHostBuilderExtensions.cs
@@ -6,6 +6,9 @@
namespace Microsoft.AspNetCore.Hosting
{
+ ///
+ /// Extension method to add Azure AppServices integration to the app.
+ ///
public static class AppServicesWebHostBuilderExtensions
{
///
diff --git a/src/Azure/AzureAppServicesIntegration/src/Microsoft.AspNetCore.AzureAppServicesIntegration.csproj b/src/Azure/AzureAppServicesIntegration/src/Microsoft.AspNetCore.AzureAppServicesIntegration.csproj
index 9a8b2827f9bb..f1f16b992d81 100644
--- a/src/Azure/AzureAppServicesIntegration/src/Microsoft.AspNetCore.AzureAppServicesIntegration.csproj
+++ b/src/Azure/AzureAppServicesIntegration/src/Microsoft.AspNetCore.AzureAppServicesIntegration.csproj
@@ -1,9 +1,8 @@
-
+
ASP.NET Core integration with Azure AppServices.
$(DefaultNetCoreTargetFramework)
- $(NoWarn);CS1591
true
true
aspnetcore;azure;appservices
diff --git a/src/SignalR/server/SignalR/test/DefaultHubLifetimeManagerTests.cs b/src/SignalR/server/SignalR/test/DefaultHubLifetimeManagerTests.cs
index e1f0240c7df9..c3c30c48017c 100644
--- a/src/SignalR/server/SignalR/test/DefaultHubLifetimeManagerTests.cs
+++ b/src/SignalR/server/SignalR/test/DefaultHubLifetimeManagerTests.cs
@@ -12,11 +12,11 @@
namespace Microsoft.AspNetCore.SignalR.Tests
{
- public class DefaultHubLifetimeManagerTests : HubLifetimeManagerTestsBase
+ public class DefaultHubLifetimeManagerTests : HubLifetimeManagerTestsBase
{
- public override HubLifetimeManager CreateNewHubLifetimeManager()
+ public override HubLifetimeManager CreateNewHubLifetimeManager()
{
- return new DefaultHubLifetimeManager(new Logger>(NullLoggerFactory.Instance));
+ return new DefaultHubLifetimeManager(new Logger>(NullLoggerFactory.Instance));
}
[Fact]
diff --git a/src/SignalR/server/Specification.Tests/src/HubLifetimeManagerTestBase.cs b/src/SignalR/server/Specification.Tests/src/HubLifetimeManagerTestBase.cs
index 1313911d095b..f1dcaa3f09ff 100644
--- a/src/SignalR/server/Specification.Tests/src/HubLifetimeManagerTestBase.cs
+++ b/src/SignalR/server/Specification.Tests/src/HubLifetimeManagerTestBase.cs
@@ -1,6 +1,7 @@
-// Copyright (c) .NET Foundation. All rights reserved.
+// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.SignalR.Protocol;
using Microsoft.AspNetCore.SignalR.Tests;
@@ -8,12 +9,28 @@
namespace Microsoft.AspNetCore.SignalR.Specification.Tests
{
+ ///
+ /// Base test class for lifetime manager implementations. Nothing specific to scale-out for these tests.
+ ///
+ /// The type of the .
public abstract class HubLifetimeManagerTestsBase where THub : Hub
{
+ ///
+ /// This API is obsolete and will be removed in a future version. Use CreateNewHubLifetimeManager in tests instead.
+ ///
+ [Obsolete("This API is obsolete and will be removed in a future version. Use CreateNewHubLifetimeManager in tests instead.")]
public HubLifetimeManager Manager { get; set; }
+ ///
+ /// Method to create an implementation of for use in tests.
+ ///
+ /// The implementation of to test against.
public abstract HubLifetimeManager CreateNewHubLifetimeManager();
+ ///
+ /// Specification test for SignalR HubLifetimeManager.
+ ///
+ /// A representing the asynchronous completion of the test.
[Fact]
public async Task SendAllAsyncWritesToAllConnectionsOutput()
{
@@ -41,6 +58,10 @@ public async Task SendAllAsyncWritesToAllConnectionsOutput()
}
}
+ ///
+ /// Specification test for SignalR HubLifetimeManager.
+ ///
+ /// A representing the asynchronous completion of the test.
[Fact]
public async Task SendAllAsyncDoesNotWriteToDisconnectedConnectionsOutput()
{
@@ -67,6 +88,10 @@ public async Task SendAllAsyncDoesNotWriteToDisconnectedConnectionsOutput()
}
}
+ ///
+ /// Specification test for SignalR HubLifetimeManager.
+ ///
+ /// A representing the asynchronous completion of the test.
[Fact]
public async Task SendGroupAsyncWritesToAllConnectionsInGroupOutput()
{
@@ -93,6 +118,10 @@ public async Task SendGroupAsyncWritesToAllConnectionsInGroupOutput()
}
}
+ ///
+ /// Specification test for SignalR HubLifetimeManager.
+ ///
+ /// A representing the asynchronous completion of the test.
[Fact]
public async Task SendGroupExceptAsyncDoesNotWriteToExcludedConnections()
{
@@ -120,6 +149,10 @@ public async Task SendGroupExceptAsyncDoesNotWriteToExcludedConnections()
}
}
+ ///
+ /// Specification test for SignalR HubLifetimeManager.
+ ///
+ /// A representing the asynchronous completion of the test.
[Fact]
public async Task SendConnectionAsyncWritesToConnectionOutput()
{
diff --git a/src/SignalR/server/Specification.Tests/src/Microsoft.AspNetCore.SignalR.Specification.Tests.csproj b/src/SignalR/server/Specification.Tests/src/Microsoft.AspNetCore.SignalR.Specification.Tests.csproj
index 962b873e908e..54357528832b 100644
--- a/src/SignalR/server/Specification.Tests/src/Microsoft.AspNetCore.SignalR.Specification.Tests.csproj
+++ b/src/SignalR/server/Specification.Tests/src/Microsoft.AspNetCore.SignalR.Specification.Tests.csproj
@@ -1,10 +1,9 @@
-
+
Tests for users to verify their own implementations of SignalR types
$(DefaultNetCoreTargetFramework)
true
- $(NoWarn);CS1591
diff --git a/src/SignalR/server/Specification.Tests/src/ScaleoutHubLifetimeManagerTests.cs b/src/SignalR/server/Specification.Tests/src/ScaleoutHubLifetimeManagerTests.cs
index e8783b79faf4..c4a12de78a22 100644
--- a/src/SignalR/server/Specification.Tests/src/ScaleoutHubLifetimeManagerTests.cs
+++ b/src/SignalR/server/Specification.Tests/src/ScaleoutHubLifetimeManagerTests.cs
@@ -1,8 +1,6 @@
-// Copyright (c) .NET Foundation. All rights reserved.
+// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
-using System;
-using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.SignalR.Protocol;
using Microsoft.AspNetCore.SignalR.Tests;
@@ -10,10 +8,24 @@
namespace Microsoft.AspNetCore.SignalR.Specification.Tests
{
- public abstract class ScaleoutHubLifetimeManagerTests : HubLifetimeManagerTestsBase
+ ///
+ /// Base test class for lifetime manager implementations that support server scale-out.
+ ///
+ /// An in-memory implementation of the backplane that s communicate with.
+ public abstract class ScaleoutHubLifetimeManagerTests : HubLifetimeManagerTestsBase
{
+ ///
+ /// Method to create an implementation of an in-memory backplane for use in tests.
+ ///
+ /// The backplane implementation.
public abstract TBackplane CreateBackplane();
- public abstract HubLifetimeManager CreateNewHubLifetimeManager(TBackplane backplane);
+
+ ///
+ /// Method to create an implementation of that uses the backplane from .
+ ///
+ /// The backplane implementation for use in the .
+ ///
+ public abstract HubLifetimeManager CreateNewHubLifetimeManager(TBackplane backplane);
private async Task AssertMessageAsync(TestClient client)
{
@@ -23,9 +35,12 @@ private async Task AssertMessageAsync(TestClient client)
Assert.Equal("World", (string)message.Arguments[0]);
}
+ ///
+ /// Specification test for SignalR HubLifetimeManager.
+ ///
+ /// A representing the asynchronous completion of the test.
[Fact]
public async Task InvokeAllAsyncWithMultipleServersWritesToAllConnectionsOutput()
-
{
var backplane = CreateBackplane();
var manager1 = CreateNewHubLifetimeManager(backplane);
@@ -47,6 +62,10 @@ public async Task InvokeAllAsyncWithMultipleServersWritesToAllConnectionsOutput(
}
}
+ ///
+ /// Specification test for SignalR HubLifetimeManager.
+ ///
+ /// A representing the asynchronous completion of the test.
[Fact]
public async Task InvokeAllAsyncWithMultipleServersDoesNotWriteToDisconnectedConnectionsOutput()
{
@@ -73,6 +92,10 @@ public async Task InvokeAllAsyncWithMultipleServersDoesNotWriteToDisconnectedCon
}
}
+ ///
+ /// Specification test for SignalR HubLifetimeManager.
+ ///
+ /// A representing the asynchronous completion of the test.
[Fact]
public async Task InvokeConnectionAsyncOnServerWithoutConnectionWritesOutputToConnection()
{
@@ -93,6 +116,10 @@ public async Task InvokeConnectionAsyncOnServerWithoutConnectionWritesOutputToCo
}
}
+ ///
+ /// Specification test for SignalR HubLifetimeManager.
+ ///
+ /// A representing the asynchronous completion of the test.
[Fact]
public async Task InvokeGroupAsyncOnServerWithoutConnectionWritesOutputToGroupConnection()
{
@@ -115,6 +142,10 @@ public async Task InvokeGroupAsyncOnServerWithoutConnectionWritesOutputToGroupCo
}
}
+ ///
+ /// Specification test for SignalR HubLifetimeManager.
+ ///
+ /// A representing the asynchronous completion of the test.
[Fact]
public async Task DisconnectConnectionRemovesConnectionFromGroup()
{
@@ -137,6 +168,10 @@ public async Task DisconnectConnectionRemovesConnectionFromGroup()
}
}
+ ///
+ /// Specification test for SignalR HubLifetimeManager.
+ ///
+ /// A representing the asynchronous completion of the test.
[Fact]
public async Task RemoveGroupFromLocalConnectionNotInGroupDoesNothing()
{
@@ -153,6 +188,10 @@ public async Task RemoveGroupFromLocalConnectionNotInGroupDoesNothing()
}
}
+ ///
+ /// Specification test for SignalR HubLifetimeManager.
+ ///
+ /// A representing the asynchronous completion of the test.
[Fact]
public async Task RemoveGroupFromConnectionOnDifferentServerNotInGroupDoesNothing()
{
@@ -170,6 +209,10 @@ public async Task RemoveGroupFromConnectionOnDifferentServerNotInGroupDoesNothin
}
}
+ ///
+ /// Specification test for SignalR HubLifetimeManager.
+ ///
+ /// A representing the asynchronous completion of the test.
[Fact]
public async Task AddGroupAsyncForConnectionOnDifferentServerWorks()
{
@@ -191,6 +234,10 @@ public async Task AddGroupAsyncForConnectionOnDifferentServerWorks()
}
}
+ ///
+ /// Specification test for SignalR HubLifetimeManager.
+ ///
+ /// A representing the asynchronous completion of the test.
[Fact]
public async Task AddGroupAsyncForLocalConnectionAlreadyInGroupDoesNothing()
{
@@ -213,6 +260,10 @@ public async Task AddGroupAsyncForLocalConnectionAlreadyInGroupDoesNothing()
}
}
+ ///
+ /// Specification test for SignalR HubLifetimeManager.
+ ///
+ /// A representing the asynchronous completion of the test.
[Fact]
public async Task AddGroupAsyncForConnectionOnDifferentServerAlreadyInGroupDoesNothing()
{
@@ -236,6 +287,10 @@ public async Task AddGroupAsyncForConnectionOnDifferentServerAlreadyInGroupDoesN
}
}
+ ///
+ /// Specification test for SignalR HubLifetimeManager.
+ ///
+ /// A representing the asynchronous completion of the test.
[Fact]
public async Task RemoveGroupAsyncForConnectionOnDifferentServerWorks()
{
@@ -263,6 +318,10 @@ public async Task RemoveGroupAsyncForConnectionOnDifferentServerWorks()
}
}
+ ///
+ /// Specification test for SignalR HubLifetimeManager.
+ ///
+ /// A representing the asynchronous completion of the test.
[Fact]
public async Task InvokeConnectionAsyncForLocalConnectionDoesNotPublishToBackplane()
{
@@ -285,6 +344,10 @@ public async Task InvokeConnectionAsyncForLocalConnectionDoesNotPublishToBackpla
}
}
+ ///
+ /// Specification test for SignalR HubLifetimeManager.
+ ///
+ /// A representing the asynchronous completion of the test.
[Fact]
public async Task WritingToRemoteConnectionThatFailsDoesNotThrow()
{
@@ -305,6 +368,10 @@ public async Task WritingToRemoteConnectionThatFailsDoesNotThrow()
}
}
+ ///
+ /// Specification test for SignalR HubLifetimeManager.
+ ///
+ /// A representing the asynchronous completion of the test.
[Fact]
public async Task WritingToGroupWithOneConnectionFailingSecondConnectionStillReceivesMessage()
{
@@ -336,6 +403,10 @@ public async Task WritingToGroupWithOneConnectionFailingSecondConnectionStillRec
}
}
+ ///
+ /// Specification test for SignalR HubLifetimeManager.
+ ///
+ /// A representing the asynchronous completion of the test.
[Fact]
public async Task InvokeUserSendsToAllConnectionsForUser()
{
@@ -360,6 +431,10 @@ public async Task InvokeUserSendsToAllConnectionsForUser()
}
}
+ ///
+ /// Specification test for SignalR HubLifetimeManager.
+ ///
+ /// A representing the asynchronous completion of the test.
[Fact]
public async Task StillSubscribedToUserAfterOneOfMultipleConnectionsAssociatedWithUserDisconnects()
{
@@ -389,7 +464,4 @@ public async Task StillSubscribedToUserAfterOneOfMultipleConnectionsAssociatedWi
}
}
}
- public class MyHub : Hub
- {
- }
}
diff --git a/src/SignalR/server/StackExchangeRedis/test/RedisHubLifetimeManagerTests.cs b/src/SignalR/server/StackExchangeRedis/test/RedisHubLifetimeManagerTests.cs
index c2c4a3f5f794..096a02a86826 100644
--- a/src/SignalR/server/StackExchangeRedis/test/RedisHubLifetimeManagerTests.cs
+++ b/src/SignalR/server/StackExchangeRedis/test/RedisHubLifetimeManagerTests.cs
@@ -22,13 +22,13 @@ public class TestObject
public string TestProperty { get; set; }
}
- private RedisHubLifetimeManager CreateLifetimeManager(TestRedisServer server, MessagePackHubProtocolOptions messagePackOptions = null, NewtonsoftJsonHubProtocolOptions jsonOptions = null)
+ private RedisHubLifetimeManager CreateLifetimeManager(TestRedisServer server, MessagePackHubProtocolOptions messagePackOptions = null, NewtonsoftJsonHubProtocolOptions jsonOptions = null)
{
var options = new RedisOptions() { ConnectionFactory = async (t) => await Task.FromResult(new TestConnectionMultiplexer(server)) };
messagePackOptions = messagePackOptions ?? new MessagePackHubProtocolOptions();
jsonOptions = jsonOptions ?? new NewtonsoftJsonHubProtocolOptions();
- return new RedisHubLifetimeManager(
- NullLogger>.Instance,
+ return new RedisHubLifetimeManager(
+ NullLogger>.Instance,
Options.Create(options),
new DefaultHubProtocolResolver(new IHubProtocol[]
{