diff --git a/src/SignalR/clients/csharp/Client.Core/ref/Microsoft.AspNetCore.SignalR.Client.Core.netcoreapp3.0.cs b/src/SignalR/clients/csharp/Client.Core/ref/Microsoft.AspNetCore.SignalR.Client.Core.netcoreapp3.0.cs index 4124f33b55d5..419936b5de24 100644 --- a/src/SignalR/clients/csharp/Client.Core/ref/Microsoft.AspNetCore.SignalR.Client.Core.netcoreapp3.0.cs +++ b/src/SignalR/clients/csharp/Client.Core/ref/Microsoft.AspNetCore.SignalR.Client.Core.netcoreapp3.0.cs @@ -1,22 +1,6 @@ // 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. -namespace Microsoft.AspNetCore.Internal -{ - public static partial class AwaitableThreadPool - { - public static Microsoft.AspNetCore.Internal.AwaitableThreadPool.Awaitable Yield() { throw null; } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential, Size=1)] - public readonly partial struct Awaitable : System.Runtime.CompilerServices.ICriticalNotifyCompletion, System.Runtime.CompilerServices.INotifyCompletion - { - public bool IsCompleted { get { throw null; } } - public Microsoft.AspNetCore.Internal.AwaitableThreadPool.Awaitable GetAwaiter() { throw null; } - public void GetResult() { } - public void OnCompleted(System.Action continuation) { } - public void UnsafeOnCompleted(System.Action continuation) { } - } - } -} namespace Microsoft.AspNetCore.SignalR.Client { public partial class HubConnection diff --git a/src/SignalR/clients/csharp/Client.Core/ref/Microsoft.AspNetCore.SignalR.Client.Core.netstandard2.0.cs b/src/SignalR/clients/csharp/Client.Core/ref/Microsoft.AspNetCore.SignalR.Client.Core.netstandard2.0.cs index 4124f33b55d5..419936b5de24 100644 --- a/src/SignalR/clients/csharp/Client.Core/ref/Microsoft.AspNetCore.SignalR.Client.Core.netstandard2.0.cs +++ b/src/SignalR/clients/csharp/Client.Core/ref/Microsoft.AspNetCore.SignalR.Client.Core.netstandard2.0.cs @@ -1,22 +1,6 @@ // 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. -namespace Microsoft.AspNetCore.Internal -{ - public static partial class AwaitableThreadPool - { - public static Microsoft.AspNetCore.Internal.AwaitableThreadPool.Awaitable Yield() { throw null; } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential, Size=1)] - public readonly partial struct Awaitable : System.Runtime.CompilerServices.ICriticalNotifyCompletion, System.Runtime.CompilerServices.INotifyCompletion - { - public bool IsCompleted { get { throw null; } } - public Microsoft.AspNetCore.Internal.AwaitableThreadPool.Awaitable GetAwaiter() { throw null; } - public void GetResult() { } - public void OnCompleted(System.Action continuation) { } - public void UnsafeOnCompleted(System.Action continuation) { } - } - } -} namespace Microsoft.AspNetCore.SignalR.Client { public partial class HubConnection diff --git a/src/SignalR/clients/csharp/Client.Core/ref/Microsoft.AspNetCore.SignalR.Client.Core.netstandard2.1.cs b/src/SignalR/clients/csharp/Client.Core/ref/Microsoft.AspNetCore.SignalR.Client.Core.netstandard2.1.cs index 4124f33b55d5..419936b5de24 100644 --- a/src/SignalR/clients/csharp/Client.Core/ref/Microsoft.AspNetCore.SignalR.Client.Core.netstandard2.1.cs +++ b/src/SignalR/clients/csharp/Client.Core/ref/Microsoft.AspNetCore.SignalR.Client.Core.netstandard2.1.cs @@ -1,22 +1,6 @@ // 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. -namespace Microsoft.AspNetCore.Internal -{ - public static partial class AwaitableThreadPool - { - public static Microsoft.AspNetCore.Internal.AwaitableThreadPool.Awaitable Yield() { throw null; } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential, Size=1)] - public readonly partial struct Awaitable : System.Runtime.CompilerServices.ICriticalNotifyCompletion, System.Runtime.CompilerServices.INotifyCompletion - { - public bool IsCompleted { get { throw null; } } - public Microsoft.AspNetCore.Internal.AwaitableThreadPool.Awaitable GetAwaiter() { throw null; } - public void GetResult() { } - public void OnCompleted(System.Action continuation) { } - public void UnsafeOnCompleted(System.Action continuation) { } - } - } -} namespace Microsoft.AspNetCore.SignalR.Client { public partial class HubConnection diff --git a/src/SignalR/clients/csharp/Http.Connections.Client/ref/Microsoft.AspNetCore.Http.Connections.Client.netcoreapp3.0.cs b/src/SignalR/clients/csharp/Http.Connections.Client/ref/Microsoft.AspNetCore.Http.Connections.Client.netcoreapp3.0.cs index 3c74a6e8c1fa..35b6c7cc3579 100644 --- a/src/SignalR/clients/csharp/Http.Connections.Client/ref/Microsoft.AspNetCore.Http.Connections.Client.netcoreapp3.0.cs +++ b/src/SignalR/clients/csharp/Http.Connections.Client/ref/Microsoft.AspNetCore.Http.Connections.Client.netcoreapp3.0.cs @@ -47,47 +47,3 @@ public TransportFailedException(string transportType, string message, System.Exc public string TransportType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } } } -namespace Microsoft.AspNetCore.Http.Connections.Client.Internal -{ - public partial interface ITransport : System.IO.Pipelines.IDuplexPipe - { - System.Threading.Tasks.Task StartAsync(System.Uri url, Microsoft.AspNetCore.Connections.TransferFormat transferFormat, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - System.Threading.Tasks.Task StopAsync(); - } - public partial interface ITransportFactory - { - Microsoft.AspNetCore.Http.Connections.Client.Internal.ITransport CreateTransport(Microsoft.AspNetCore.Http.Connections.HttpTransportType availableServerTransports); - } - public partial class LongPollingTransport : Microsoft.AspNetCore.Http.Connections.Client.Internal.ITransport, System.IO.Pipelines.IDuplexPipe - { - public LongPollingTransport(System.Net.Http.HttpClient httpClient) { } - public LongPollingTransport(System.Net.Http.HttpClient httpClient, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) { } - public System.IO.Pipelines.PipeReader Input { get { throw null; } } - public System.IO.Pipelines.PipeWriter Output { get { throw null; } } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task StartAsync(System.Uri url, Microsoft.AspNetCore.Connections.TransferFormat transferFormat, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task StopAsync() { throw null; } - } - public partial class ServerSentEventsTransport : Microsoft.AspNetCore.Http.Connections.Client.Internal.ITransport, System.IO.Pipelines.IDuplexPipe - { - public ServerSentEventsTransport(System.Net.Http.HttpClient httpClient) { } - public ServerSentEventsTransport(System.Net.Http.HttpClient httpClient, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) { } - public System.IO.Pipelines.PipeReader Input { get { throw null; } } - public System.IO.Pipelines.PipeWriter Output { get { throw null; } } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task StartAsync(System.Uri url, Microsoft.AspNetCore.Connections.TransferFormat transferFormat, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task StopAsync() { throw null; } - } - public partial class WebSocketsTransport : Microsoft.AspNetCore.Http.Connections.Client.Internal.ITransport, System.IO.Pipelines.IDuplexPipe - { - public WebSocketsTransport(Microsoft.AspNetCore.Http.Connections.Client.HttpConnectionOptions httpConnectionOptions, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, System.Func> accessTokenProvider) { } - public System.IO.Pipelines.PipeReader Input { get { throw null; } } - public System.IO.Pipelines.PipeWriter Output { get { throw null; } } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task StartAsync(System.Uri url, Microsoft.AspNetCore.Connections.TransferFormat transferFormat, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task StopAsync() { throw null; } - } -} diff --git a/src/SignalR/clients/csharp/Http.Connections.Client/ref/Microsoft.AspNetCore.Http.Connections.Client.netstandard2.0.cs b/src/SignalR/clients/csharp/Http.Connections.Client/ref/Microsoft.AspNetCore.Http.Connections.Client.netstandard2.0.cs index 3c74a6e8c1fa..35b6c7cc3579 100644 --- a/src/SignalR/clients/csharp/Http.Connections.Client/ref/Microsoft.AspNetCore.Http.Connections.Client.netstandard2.0.cs +++ b/src/SignalR/clients/csharp/Http.Connections.Client/ref/Microsoft.AspNetCore.Http.Connections.Client.netstandard2.0.cs @@ -47,47 +47,3 @@ public TransportFailedException(string transportType, string message, System.Exc public string TransportType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } } } -namespace Microsoft.AspNetCore.Http.Connections.Client.Internal -{ - public partial interface ITransport : System.IO.Pipelines.IDuplexPipe - { - System.Threading.Tasks.Task StartAsync(System.Uri url, Microsoft.AspNetCore.Connections.TransferFormat transferFormat, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - System.Threading.Tasks.Task StopAsync(); - } - public partial interface ITransportFactory - { - Microsoft.AspNetCore.Http.Connections.Client.Internal.ITransport CreateTransport(Microsoft.AspNetCore.Http.Connections.HttpTransportType availableServerTransports); - } - public partial class LongPollingTransport : Microsoft.AspNetCore.Http.Connections.Client.Internal.ITransport, System.IO.Pipelines.IDuplexPipe - { - public LongPollingTransport(System.Net.Http.HttpClient httpClient) { } - public LongPollingTransport(System.Net.Http.HttpClient httpClient, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) { } - public System.IO.Pipelines.PipeReader Input { get { throw null; } } - public System.IO.Pipelines.PipeWriter Output { get { throw null; } } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task StartAsync(System.Uri url, Microsoft.AspNetCore.Connections.TransferFormat transferFormat, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task StopAsync() { throw null; } - } - public partial class ServerSentEventsTransport : Microsoft.AspNetCore.Http.Connections.Client.Internal.ITransport, System.IO.Pipelines.IDuplexPipe - { - public ServerSentEventsTransport(System.Net.Http.HttpClient httpClient) { } - public ServerSentEventsTransport(System.Net.Http.HttpClient httpClient, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) { } - public System.IO.Pipelines.PipeReader Input { get { throw null; } } - public System.IO.Pipelines.PipeWriter Output { get { throw null; } } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task StartAsync(System.Uri url, Microsoft.AspNetCore.Connections.TransferFormat transferFormat, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task StopAsync() { throw null; } - } - public partial class WebSocketsTransport : Microsoft.AspNetCore.Http.Connections.Client.Internal.ITransport, System.IO.Pipelines.IDuplexPipe - { - public WebSocketsTransport(Microsoft.AspNetCore.Http.Connections.Client.HttpConnectionOptions httpConnectionOptions, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, System.Func> accessTokenProvider) { } - public System.IO.Pipelines.PipeReader Input { get { throw null; } } - public System.IO.Pipelines.PipeWriter Output { get { throw null; } } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task StartAsync(System.Uri url, Microsoft.AspNetCore.Connections.TransferFormat transferFormat, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task StopAsync() { throw null; } - } -} diff --git a/src/SignalR/clients/csharp/Http.Connections.Client/ref/Microsoft.AspNetCore.Http.Connections.Client.netstandard2.1.cs b/src/SignalR/clients/csharp/Http.Connections.Client/ref/Microsoft.AspNetCore.Http.Connections.Client.netstandard2.1.cs index 3c74a6e8c1fa..35b6c7cc3579 100644 --- a/src/SignalR/clients/csharp/Http.Connections.Client/ref/Microsoft.AspNetCore.Http.Connections.Client.netstandard2.1.cs +++ b/src/SignalR/clients/csharp/Http.Connections.Client/ref/Microsoft.AspNetCore.Http.Connections.Client.netstandard2.1.cs @@ -47,47 +47,3 @@ public TransportFailedException(string transportType, string message, System.Exc public string TransportType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } } } -namespace Microsoft.AspNetCore.Http.Connections.Client.Internal -{ - public partial interface ITransport : System.IO.Pipelines.IDuplexPipe - { - System.Threading.Tasks.Task StartAsync(System.Uri url, Microsoft.AspNetCore.Connections.TransferFormat transferFormat, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); - System.Threading.Tasks.Task StopAsync(); - } - public partial interface ITransportFactory - { - Microsoft.AspNetCore.Http.Connections.Client.Internal.ITransport CreateTransport(Microsoft.AspNetCore.Http.Connections.HttpTransportType availableServerTransports); - } - public partial class LongPollingTransport : Microsoft.AspNetCore.Http.Connections.Client.Internal.ITransport, System.IO.Pipelines.IDuplexPipe - { - public LongPollingTransport(System.Net.Http.HttpClient httpClient) { } - public LongPollingTransport(System.Net.Http.HttpClient httpClient, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) { } - public System.IO.Pipelines.PipeReader Input { get { throw null; } } - public System.IO.Pipelines.PipeWriter Output { get { throw null; } } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task StartAsync(System.Uri url, Microsoft.AspNetCore.Connections.TransferFormat transferFormat, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task StopAsync() { throw null; } - } - public partial class ServerSentEventsTransport : Microsoft.AspNetCore.Http.Connections.Client.Internal.ITransport, System.IO.Pipelines.IDuplexPipe - { - public ServerSentEventsTransport(System.Net.Http.HttpClient httpClient) { } - public ServerSentEventsTransport(System.Net.Http.HttpClient httpClient, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) { } - public System.IO.Pipelines.PipeReader Input { get { throw null; } } - public System.IO.Pipelines.PipeWriter Output { get { throw null; } } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task StartAsync(System.Uri url, Microsoft.AspNetCore.Connections.TransferFormat transferFormat, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task StopAsync() { throw null; } - } - public partial class WebSocketsTransport : Microsoft.AspNetCore.Http.Connections.Client.Internal.ITransport, System.IO.Pipelines.IDuplexPipe - { - public WebSocketsTransport(Microsoft.AspNetCore.Http.Connections.Client.HttpConnectionOptions httpConnectionOptions, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, System.Func> accessTokenProvider) { } - public System.IO.Pipelines.PipeReader Input { get { throw null; } } - public System.IO.Pipelines.PipeWriter Output { get { throw null; } } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task StartAsync(System.Uri url, Microsoft.AspNetCore.Connections.TransferFormat transferFormat, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task StopAsync() { throw null; } - } -} diff --git a/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/ITransport.cs b/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/ITransport.cs index fe9d94c8bf58..e5f4bbe297c4 100644 --- a/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/ITransport.cs +++ b/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/ITransport.cs @@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Client.Internal { - public interface ITransport : IDuplexPipe + internal interface ITransport : IDuplexPipe { Task StartAsync(Uri url, TransferFormat transferFormat, CancellationToken cancellationToken = default); Task StopAsync(); diff --git a/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/ITransportFactory.cs b/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/ITransportFactory.cs index 7c763d3ea007..069c2de72dd5 100644 --- a/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/ITransportFactory.cs +++ b/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/ITransportFactory.cs @@ -3,7 +3,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Client.Internal { - public interface ITransportFactory + internal interface ITransportFactory { ITransport CreateTransport(HttpTransportType availableServerTransports); } diff --git a/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/LongPollingTransport.Log.cs b/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/LongPollingTransport.Log.cs index 2329c49f4110..c1b96edfce58 100644 --- a/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/LongPollingTransport.Log.cs +++ b/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/LongPollingTransport.Log.cs @@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Client.Internal { - public partial class LongPollingTransport + internal partial class LongPollingTransport { private static class Log { diff --git a/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/LongPollingTransport.cs b/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/LongPollingTransport.cs index 9d953f011477..e9f5b21a5be2 100644 --- a/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/LongPollingTransport.cs +++ b/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/LongPollingTransport.cs @@ -13,7 +13,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Client.Internal { - public partial class LongPollingTransport : ITransport + internal partial class LongPollingTransport : ITransport { private readonly HttpClient _httpClient; private readonly ILogger _logger; diff --git a/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/ServerSentEventsTransport.Log.cs b/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/ServerSentEventsTransport.Log.cs index 71b1aa2d8873..7bc2d87bc912 100644 --- a/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/ServerSentEventsTransport.Log.cs +++ b/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/ServerSentEventsTransport.Log.cs @@ -7,7 +7,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Client.Internal { - public partial class ServerSentEventsTransport + internal partial class ServerSentEventsTransport { private static class Log { diff --git a/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/ServerSentEventsTransport.cs b/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/ServerSentEventsTransport.cs index d3bebe316032..a8526e720e16 100644 --- a/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/ServerSentEventsTransport.cs +++ b/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/ServerSentEventsTransport.cs @@ -13,7 +13,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Client.Internal { - public partial class ServerSentEventsTransport : ITransport + internal partial class ServerSentEventsTransport : ITransport { private readonly HttpClient _httpClient; private readonly ILogger _logger; diff --git a/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/WebSocketsTransport.Log.cs b/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/WebSocketsTransport.Log.cs index 4ea783774fd3..31d8859f9f87 100644 --- a/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/WebSocketsTransport.Log.cs +++ b/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/WebSocketsTransport.Log.cs @@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Client.Internal { - public partial class WebSocketsTransport + internal partial class WebSocketsTransport { private static class Log { diff --git a/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/WebSocketsTransport.cs b/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/WebSocketsTransport.cs index bab832ba86c6..e4b395818df0 100644 --- a/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/WebSocketsTransport.cs +++ b/src/SignalR/clients/csharp/Http.Connections.Client/src/Internal/WebSocketsTransport.cs @@ -14,7 +14,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Client.Internal { - public partial class WebSocketsTransport : ITransport + internal partial class WebSocketsTransport : ITransport { private readonly ClientWebSocket _webSocket; private readonly Func> _accessTokenProvider; diff --git a/src/SignalR/clients/csharp/Http.Connections.Client/src/Properties/AssemblyInfo.cs b/src/SignalR/clients/csharp/Http.Connections.Client/src/Properties/AssemblyInfo.cs index 9befa2be5695..08686a03d4b4 100644 --- a/src/SignalR/clients/csharp/Http.Connections.Client/src/Properties/AssemblyInfo.cs +++ b/src/SignalR/clients/csharp/Http.Connections.Client/src/Properties/AssemblyInfo.cs @@ -5,4 +5,5 @@ [assembly: InternalsVisibleTo("Microsoft.AspNetCore.SignalR.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.AspNetCore.SignalR.Client.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] -[assembly: InternalsVisibleTo("Microsoft.AspNetCore.SignalR.Microbenchmarks, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] \ No newline at end of file +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.SignalR.Microbenchmarks, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")] diff --git a/src/SignalR/common/Http.Connections/ref/Microsoft.AspNetCore.Http.Connections.netcoreapp3.0.cs b/src/SignalR/common/Http.Connections/ref/Microsoft.AspNetCore.Http.Connections.netcoreapp3.0.cs index afe027ed6653..978e249509cc 100644 --- a/src/SignalR/common/Http.Connections/ref/Microsoft.AspNetCore.Http.Connections.netcoreapp3.0.cs +++ b/src/SignalR/common/Http.Connections/ref/Microsoft.AspNetCore.Http.Connections.netcoreapp3.0.cs @@ -61,6 +61,11 @@ public partial class NegotiateMetadata { public NegotiateMetadata() { } } + public static partial class ServerSentEventsMessageFormatter + { + [System.Diagnostics.DebuggerStepThroughAttribute] + public static System.Threading.Tasks.Task WriteMessageAsync(System.Buffers.ReadOnlySequence payload, System.IO.Stream output) { throw null; } + } public partial class WebSocketOptions { public WebSocketOptions() { } @@ -79,116 +84,6 @@ public partial interface IHttpTransportFeature Microsoft.AspNetCore.Http.Connections.HttpTransportType TransportType { get; } } } -namespace Microsoft.AspNetCore.Http.Connections.Internal -{ - public partial class HttpConnectionContext : Microsoft.AspNetCore.Connections.ConnectionContext, Microsoft.AspNetCore.Connections.Features.IConnectionHeartbeatFeature, Microsoft.AspNetCore.Connections.Features.IConnectionIdFeature, Microsoft.AspNetCore.Connections.Features.IConnectionInherentKeepAliveFeature, Microsoft.AspNetCore.Connections.Features.IConnectionItemsFeature, Microsoft.AspNetCore.Connections.Features.IConnectionTransportFeature, Microsoft.AspNetCore.Connections.Features.IConnectionUserFeature, Microsoft.AspNetCore.Connections.Features.ITransferFormatFeature, Microsoft.AspNetCore.Http.Connections.Features.IHttpContextFeature, Microsoft.AspNetCore.Http.Connections.Features.IHttpTransportFeature - { - public HttpConnectionContext(string id, Microsoft.Extensions.Logging.ILogger logger) { } - public HttpConnectionContext(string id, System.IO.Pipelines.IDuplexPipe transport, System.IO.Pipelines.IDuplexPipe application, Microsoft.Extensions.Logging.ILogger logger = null) { } - public Microsoft.AspNetCore.Connections.TransferFormat ActiveFormat { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public System.IO.Pipelines.IDuplexPipe Application { get { throw null; } set { } } - public System.Threading.Tasks.Task ApplicationTask { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public System.Threading.CancellationTokenSource Cancellation { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public override string ConnectionId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public override Microsoft.AspNetCore.Http.Features.IFeatureCollection Features { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public bool HasInherentKeepAlive { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Http.HttpContext HttpContext { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public override System.Collections.Generic.IDictionary Items { get { throw null; } set { } } - public System.DateTime LastSeenUtc { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public System.DateTime? LastSeenUtcIfInactive { get { throw null; } } - public System.Threading.Tasks.Task PreviousPollTask { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Http.Connections.Internal.HttpConnectionStatus Status { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Connections.TransferFormat SupportedFormats { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public override System.IO.Pipelines.IDuplexPipe Transport { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public System.Threading.Tasks.Task TransportTask { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public Microsoft.AspNetCore.Http.Connections.HttpTransportType TransportType { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public System.Security.Claims.ClaimsPrincipal User { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } - public System.Threading.SemaphoreSlim WriteLock { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task DisposeAsync(bool closeGracefully = false) { throw null; } - public void MarkInactive() { } - public void OnHeartbeat(System.Action action, object state) { } - public void TickHeartbeat() { } - public bool TryActivateLongPollingConnection(Microsoft.AspNetCore.Connections.ConnectionDelegate connectionDelegate, Microsoft.AspNetCore.Http.HttpContext nonClonedContext, System.TimeSpan pollTimeout, System.Threading.Tasks.Task currentRequestTask, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.Extensions.Logging.ILogger dispatcherLogger) { throw null; } - public bool TryActivatePersistentConnection(Microsoft.AspNetCore.Connections.ConnectionDelegate connectionDelegate, Microsoft.AspNetCore.Http.Connections.Internal.Transports.IHttpTransport transport, Microsoft.Extensions.Logging.ILogger dispatcherLogger) { throw null; } - } - public partial class HttpConnectionDispatcher - { - public HttpConnectionDispatcher(Microsoft.AspNetCore.Http.Connections.Internal.HttpConnectionManager manager, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) { } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task ExecuteAsync(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Http.Connections.HttpConnectionDispatcherOptions options, Microsoft.AspNetCore.Connections.ConnectionDelegate connectionDelegate) { throw null; } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task ExecuteNegotiateAsync(Microsoft.AspNetCore.Http.HttpContext context, Microsoft.AspNetCore.Http.Connections.HttpConnectionDispatcherOptions options) { throw null; } - } - public partial class HttpConnectionManager - { - public HttpConnectionManager(Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.Extensions.Hosting.IHostApplicationLifetime appLifetime) { } - public HttpConnectionManager(Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.Extensions.Hosting.IHostApplicationLifetime appLifetime, Microsoft.Extensions.Options.IOptions connectionOptions) { } - public void CloseConnections() { } - public Microsoft.AspNetCore.Http.Connections.Internal.HttpConnectionContext CreateConnection() { throw null; } - public Microsoft.AspNetCore.Http.Connections.Internal.HttpConnectionContext CreateConnection(System.IO.Pipelines.PipeOptions transportPipeOptions, System.IO.Pipelines.PipeOptions appPipeOptions) { throw null; } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task DisposeAndRemoveAsync(Microsoft.AspNetCore.Http.Connections.Internal.HttpConnectionContext connection, bool closeGracefully) { throw null; } - public void RemoveConnection(string id) { } - public void Scan() { } - public void Start() { } - public bool TryGetConnection(string id, out Microsoft.AspNetCore.Http.Connections.Internal.HttpConnectionContext connection) { throw null; } - } - public enum HttpConnectionStatus - { - Inactive = 0, - Active = 1, - Disposed = 2, - } - public static partial class ServerSentEventsMessageFormatter - { - [System.Diagnostics.DebuggerStepThroughAttribute] - public static System.Threading.Tasks.Task WriteMessageAsync(System.Buffers.ReadOnlySequence payload, System.IO.Stream output) { throw null; } - } -} -namespace Microsoft.AspNetCore.Http.Connections.Internal.Transports -{ - public partial interface IHttpTransport - { - System.Threading.Tasks.Task ProcessRequestAsync(Microsoft.AspNetCore.Http.HttpContext context, System.Threading.CancellationToken token); - } - public partial class LongPollingTransport : Microsoft.AspNetCore.Http.Connections.Internal.Transports.IHttpTransport - { - public LongPollingTransport(System.Threading.CancellationToken timeoutToken, System.IO.Pipelines.PipeReader application, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) { } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task ProcessRequestAsync(Microsoft.AspNetCore.Http.HttpContext context, System.Threading.CancellationToken token) { throw null; } - } - public partial class ServerSentEventsTransport : Microsoft.AspNetCore.Http.Connections.Internal.Transports.IHttpTransport - { - public ServerSentEventsTransport(System.IO.Pipelines.PipeReader application, string connectionId, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) { } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task ProcessRequestAsync(Microsoft.AspNetCore.Http.HttpContext context, System.Threading.CancellationToken token) { throw null; } - } - public partial class WebSocketsTransport : Microsoft.AspNetCore.Http.Connections.Internal.Transports.IHttpTransport - { - public WebSocketsTransport(Microsoft.AspNetCore.Http.Connections.WebSocketOptions options, System.IO.Pipelines.IDuplexPipe application, Microsoft.AspNetCore.Http.Connections.Internal.HttpConnectionContext connection, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory) { } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task ProcessRequestAsync(Microsoft.AspNetCore.Http.HttpContext context, System.Threading.CancellationToken token) { throw null; } - [System.Diagnostics.DebuggerStepThroughAttribute] - public System.Threading.Tasks.Task ProcessSocketAsync(System.Net.WebSockets.WebSocket socket) { throw null; } - } -} -namespace Microsoft.AspNetCore.Internal -{ - public static partial class AwaitableThreadPool - { - public static Microsoft.AspNetCore.Internal.AwaitableThreadPool.Awaitable Yield() { throw null; } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential, Size=1)] - public readonly partial struct Awaitable : System.Runtime.CompilerServices.ICriticalNotifyCompletion, System.Runtime.CompilerServices.INotifyCompletion - { - public bool IsCompleted { get { throw null; } } - public Microsoft.AspNetCore.Internal.AwaitableThreadPool.Awaitable GetAwaiter() { throw null; } - public void GetResult() { } - public void OnCompleted(System.Action continuation) { } - public void UnsafeOnCompleted(System.Action continuation) { } - } - } -} namespace Microsoft.Extensions.DependencyInjection { public static partial class ConnectionsDependencyInjectionExtensions diff --git a/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionContext.cs b/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionContext.cs index 5556f76dd14f..040f8f66d341 100644 --- a/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionContext.cs +++ b/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionContext.cs @@ -20,7 +20,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Internal { - public class HttpConnectionContext : ConnectionContext, + internal class HttpConnectionContext : ConnectionContext, IConnectionIdFeature, IConnectionItemsFeature, IConnectionTransportFeature, @@ -323,7 +323,7 @@ private async Task WaitOnTasks(Task applicationTask, Task transportTask, bool cl } } - public bool TryActivatePersistentConnection( + internal bool TryActivatePersistentConnection( ConnectionDelegate connectionDelegate, IHttpTransport transport, ILogger dispatcherLogger) diff --git a/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionDispatcher.Log.cs b/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionDispatcher.Log.cs index 8a013db4adb8..5bcf32c39ae8 100644 --- a/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionDispatcher.Log.cs +++ b/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionDispatcher.Log.cs @@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Internal { - public partial class HttpConnectionDispatcher + internal partial class HttpConnectionDispatcher { internal static class Log { diff --git a/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionDispatcher.cs b/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionDispatcher.cs index bc495da58c1d..895ed1811bce 100644 --- a/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionDispatcher.cs +++ b/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionDispatcher.cs @@ -19,7 +19,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Internal { - public partial class HttpConnectionDispatcher + internal partial class HttpConnectionDispatcher { private static readonly AvailableTransport _webSocketAvailableTransport = new AvailableTransport diff --git a/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionManager.Log.cs b/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionManager.Log.cs index 46899492bd8a..2fa9d218852d 100644 --- a/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionManager.Log.cs +++ b/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionManager.Log.cs @@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Internal { - public partial class HttpConnectionManager + internal partial class HttpConnectionManager { private static class Log { diff --git a/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionManager.cs b/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionManager.cs index 206f352acc1e..dda35866a42d 100644 --- a/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionManager.cs +++ b/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionManager.cs @@ -19,7 +19,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Internal { - public partial class HttpConnectionManager + internal partial class HttpConnectionManager { // TODO: Consider making this configurable? At least for testing? private static readonly TimeSpan _heartbeatTickRate = TimeSpan.FromSeconds(1); @@ -57,7 +57,7 @@ public void Start() _ = ExecuteTimerLoop(); } - public bool TryGetConnection(string id, out HttpConnectionContext connection) + internal bool TryGetConnection(string id, out HttpConnectionContext connection) { connection = null; @@ -69,7 +69,7 @@ public bool TryGetConnection(string id, out HttpConnectionContext connection) return false; } - public HttpConnectionContext CreateConnection() + internal HttpConnectionContext CreateConnection() { return CreateConnection(PipeOptions.Default, PipeOptions.Default); } @@ -78,7 +78,7 @@ public HttpConnectionContext CreateConnection() /// Creates a connection without Pipes setup to allow saving allocations until Pipes are needed. /// /// - public HttpConnectionContext CreateConnection(PipeOptions transportPipeOptions, PipeOptions appPipeOptions) + internal HttpConnectionContext CreateConnection(PipeOptions transportPipeOptions, PipeOptions appPipeOptions) { var id = MakeNewConnectionId(); @@ -183,7 +183,7 @@ public void CloseConnections() Task.WaitAll(tasks.ToArray(), TimeSpan.FromSeconds(5)); } - public async Task DisposeAndRemoveAsync(HttpConnectionContext connection, bool closeGracefully) + internal async Task DisposeAndRemoveAsync(HttpConnectionContext connection, bool closeGracefully) { try { diff --git a/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionStatus.cs b/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionStatus.cs index a167bba04bbb..19e7db79daec 100644 --- a/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionStatus.cs +++ b/src/SignalR/common/Http.Connections/src/Internal/HttpConnectionStatus.cs @@ -3,7 +3,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Internal { - public enum HttpConnectionStatus + internal enum HttpConnectionStatus { Inactive, Active, diff --git a/src/SignalR/common/Http.Connections/src/Internal/Transports/IHttpTransport.cs b/src/SignalR/common/Http.Connections/src/Internal/Transports/IHttpTransport.cs index cfaf483f0e04..f70d84e2edbe 100644 --- a/src/SignalR/common/Http.Connections/src/Internal/Transports/IHttpTransport.cs +++ b/src/SignalR/common/Http.Connections/src/Internal/Transports/IHttpTransport.cs @@ -7,7 +7,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Internal.Transports { - public interface IHttpTransport + internal interface IHttpTransport { /// /// Executes the transport diff --git a/src/SignalR/common/Http.Connections/src/Internal/Transports/LongPollingTransport.cs b/src/SignalR/common/Http.Connections/src/Internal/Transports/LongPollingTransport.cs index d14164b098aa..c7bc94a63af5 100644 --- a/src/SignalR/common/Http.Connections/src/Internal/Transports/LongPollingTransport.cs +++ b/src/SignalR/common/Http.Connections/src/Internal/Transports/LongPollingTransport.cs @@ -11,7 +11,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Internal.Transports { - public class LongPollingTransport : IHttpTransport + internal class LongPollingTransport : IHttpTransport { private readonly PipeReader _application; private readonly ILogger _logger; diff --git a/src/SignalR/common/Http.Connections/src/Internal/Transports/ServerSentEventsTransport.cs b/src/SignalR/common/Http.Connections/src/Internal/Transports/ServerSentEventsTransport.cs index 69253ea11bad..6dfcc06693a9 100644 --- a/src/SignalR/common/Http.Connections/src/Internal/Transports/ServerSentEventsTransport.cs +++ b/src/SignalR/common/Http.Connections/src/Internal/Transports/ServerSentEventsTransport.cs @@ -11,7 +11,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Internal.Transports { - public class ServerSentEventsTransport : IHttpTransport + internal class ServerSentEventsTransport : IHttpTransport { private readonly PipeReader _application; private readonly string _connectionId; diff --git a/src/SignalR/common/Http.Connections/src/Internal/Transports/WebSocketsTransport.Log.cs b/src/SignalR/common/Http.Connections/src/Internal/Transports/WebSocketsTransport.Log.cs index 29067a65b5be..3094240baff9 100644 --- a/src/SignalR/common/Http.Connections/src/Internal/Transports/WebSocketsTransport.Log.cs +++ b/src/SignalR/common/Http.Connections/src/Internal/Transports/WebSocketsTransport.Log.cs @@ -7,7 +7,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Internal.Transports { - public partial class WebSocketsTransport + internal partial class WebSocketsTransport { private static class Log { diff --git a/src/SignalR/common/Http.Connections/src/Internal/Transports/WebSocketsTransport.cs b/src/SignalR/common/Http.Connections/src/Internal/Transports/WebSocketsTransport.cs index 655ef883dee0..002cc1e3a63b 100644 --- a/src/SignalR/common/Http.Connections/src/Internal/Transports/WebSocketsTransport.cs +++ b/src/SignalR/common/Http.Connections/src/Internal/Transports/WebSocketsTransport.cs @@ -12,7 +12,7 @@ namespace Microsoft.AspNetCore.Http.Connections.Internal.Transports { - public partial class WebSocketsTransport : IHttpTransport + internal partial class WebSocketsTransport : IHttpTransport { private readonly WebSocketOptions _options; private readonly ILogger _logger; diff --git a/src/SignalR/common/Http.Connections/src/Properties/AssemblyInfo.cs b/src/SignalR/common/Http.Connections/src/Properties/AssemblyInfo.cs index e653ef762564..b849e763b621 100644 --- a/src/SignalR/common/Http.Connections/src/Properties/AssemblyInfo.cs +++ b/src/SignalR/common/Http.Connections/src/Properties/AssemblyInfo.cs @@ -3,4 +3,4 @@ using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Http.Connections.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] \ No newline at end of file +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.Http.Connections.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] diff --git a/src/SignalR/common/Http.Connections/src/Internal/Transports/ServerSentEventsMessageFormatter.cs b/src/SignalR/common/Http.Connections/src/ServerSentEventsMessageFormatter.cs similarity index 98% rename from src/SignalR/common/Http.Connections/src/Internal/Transports/ServerSentEventsMessageFormatter.cs rename to src/SignalR/common/Http.Connections/src/ServerSentEventsMessageFormatter.cs index 0122344e0eb8..2f69e62aa6d2 100644 --- a/src/SignalR/common/Http.Connections/src/Internal/Transports/ServerSentEventsMessageFormatter.cs +++ b/src/SignalR/common/Http.Connections/src/ServerSentEventsMessageFormatter.cs @@ -6,7 +6,7 @@ using System.IO; using System.Threading.Tasks; -namespace Microsoft.AspNetCore.Http.Connections.Internal +namespace Microsoft.AspNetCore.Http.Connections { public static class ServerSentEventsMessageFormatter { diff --git a/src/SignalR/common/Shared/AwaitableThreadPool.cs b/src/SignalR/common/Shared/AwaitableThreadPool.cs index e27c8cbbbfe5..f3e2413dc50c 100644 --- a/src/SignalR/common/Shared/AwaitableThreadPool.cs +++ b/src/SignalR/common/Shared/AwaitableThreadPool.cs @@ -9,7 +9,7 @@ namespace Microsoft.AspNetCore.Internal { - public static class AwaitableThreadPool + internal static class AwaitableThreadPool { public static Awaitable Yield() { diff --git a/src/SignalR/common/SignalR.Common/src/Properties/AssemblyInfo.cs b/src/SignalR/common/SignalR.Common/src/Properties/AssemblyInfo.cs index 4a210459c02a..0758e9ccfc2a 100644 --- a/src/SignalR/common/SignalR.Common/src/Properties/AssemblyInfo.cs +++ b/src/SignalR/common/SignalR.Common/src/Properties/AssemblyInfo.cs @@ -5,4 +5,3 @@ [assembly: InternalsVisibleTo("Microsoft.AspNetCore.SignalR.Common.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.AspNetCore.SignalR.Tests.Utils, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] -[assembly: InternalsVisibleTo("Microsoft.AspNetCore.SignalR.Microbenchmarks, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] \ No newline at end of file diff --git a/src/SignalR/perf/Microbenchmarks/Microsoft.AspNetCore.SignalR.Microbenchmarks.csproj b/src/SignalR/perf/Microbenchmarks/Microsoft.AspNetCore.SignalR.Microbenchmarks.csproj index 08733fcc972c..8011d5de2bbd 100644 --- a/src/SignalR/perf/Microbenchmarks/Microsoft.AspNetCore.SignalR.Microbenchmarks.csproj +++ b/src/SignalR/perf/Microbenchmarks/Microsoft.AspNetCore.SignalR.Microbenchmarks.csproj @@ -1,4 +1,4 @@ - + Exe @@ -8,6 +8,8 @@ + + diff --git a/src/SignalR/perf/Microbenchmarks/NegotiateProtocolBenchmark.cs b/src/SignalR/perf/Microbenchmarks/NegotiateProtocolBenchmark.cs index c0c67a0742c7..0d702dd59ae4 100644 --- a/src/SignalR/perf/Microbenchmarks/NegotiateProtocolBenchmark.cs +++ b/src/SignalR/perf/Microbenchmarks/NegotiateProtocolBenchmark.cs @@ -1,4 +1,4 @@ -// 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.Collections.Generic; @@ -88,4 +88,4 @@ public void ParsingNegotiateResponseMessageSuccessForValid4() public void ParsingNegotiateResponseMessageSuccessForValid5() => NegotiateProtocol.ParseResponse(_responseData5); } -} \ No newline at end of file +} diff --git a/src/SignalR/perf/Microbenchmarks/ServerSentEventsBenchmark.cs b/src/SignalR/perf/Microbenchmarks/ServerSentEventsBenchmark.cs index 8b6e61acb553..fd4357c95247 100644 --- a/src/SignalR/perf/Microbenchmarks/ServerSentEventsBenchmark.cs +++ b/src/SignalR/perf/Microbenchmarks/ServerSentEventsBenchmark.cs @@ -3,6 +3,7 @@ using System.IO; using System.Threading.Tasks; using BenchmarkDotNet.Attributes; +using Microsoft.AspNetCore.Http.Connections; using Microsoft.AspNetCore.Http.Connections.Client.Internal; using Microsoft.AspNetCore.Http.Connections.Internal; using Microsoft.AspNetCore.SignalR.Protocol; diff --git a/src/SignalR/server/Core/ref/Microsoft.AspNetCore.SignalR.Core.netcoreapp3.0.cs b/src/SignalR/server/Core/ref/Microsoft.AspNetCore.SignalR.Core.netcoreapp3.0.cs index 04e24eae475d..0d36db60a634 100644 --- a/src/SignalR/server/Core/ref/Microsoft.AspNetCore.SignalR.Core.netcoreapp3.0.cs +++ b/src/SignalR/server/Core/ref/Microsoft.AspNetCore.SignalR.Core.netcoreapp3.0.cs @@ -143,7 +143,7 @@ public virtual void Abort() { } } public partial class HubConnectionHandler : Microsoft.AspNetCore.Connections.ConnectionHandler where THub : Microsoft.AspNetCore.SignalR.Hub { - public HubConnectionHandler(Microsoft.AspNetCore.SignalR.HubLifetimeManager lifetimeManager, Microsoft.AspNetCore.SignalR.IHubProtocolResolver protocolResolver, Microsoft.Extensions.Options.IOptions globalHubOptions, Microsoft.Extensions.Options.IOptions> hubOptions, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.AspNetCore.SignalR.IUserIdProvider userIdProvider, Microsoft.AspNetCore.SignalR.Internal.HubDispatcher dispatcher) { } + public HubConnectionHandler(Microsoft.AspNetCore.SignalR.HubLifetimeManager lifetimeManager, Microsoft.AspNetCore.SignalR.IHubProtocolResolver protocolResolver, Microsoft.Extensions.Options.IOptions globalHubOptions, Microsoft.Extensions.Options.IOptions> hubOptions, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.AspNetCore.SignalR.IUserIdProvider userIdProvider, Microsoft.Extensions.DependencyInjection.IServiceScopeFactory serviceScopeFactory) { } [System.Diagnostics.DebuggerStepThroughAttribute] public override System.Threading.Tasks.Task OnConnectedAsync(Microsoft.AspNetCore.Connections.ConnectionContext connection) { throw null; } } @@ -206,6 +206,16 @@ public HubOptions() { } public int? StreamBufferCapacity { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } public System.Collections.Generic.IList SupportedProtocols { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } } + public partial class HubOptionsSetup : Microsoft.Extensions.Options.IConfigureOptions + { + public HubOptionsSetup(System.Collections.Generic.IEnumerable protocols) { } + public void Configure(Microsoft.AspNetCore.SignalR.HubOptions options) { } + } + public partial class HubOptionsSetup : Microsoft.Extensions.Options.IConfigureOptions> where THub : Microsoft.AspNetCore.SignalR.Hub + { + public HubOptionsSetup(Microsoft.Extensions.Options.IOptions options) { } + public void Configure(Microsoft.AspNetCore.SignalR.HubOptions options) { } + } public partial class HubOptions : Microsoft.AspNetCore.SignalR.HubOptions where THub : Microsoft.AspNetCore.SignalR.Hub { public HubOptions() { } @@ -295,84 +305,6 @@ public static partial class SignalRConnectionBuilderExtensions public static Microsoft.AspNetCore.Connections.IConnectionBuilder UseHub(this Microsoft.AspNetCore.Connections.IConnectionBuilder connectionBuilder) where THub : Microsoft.AspNetCore.SignalR.Hub { throw null; } } } -namespace Microsoft.AspNetCore.SignalR.Internal -{ - public partial class DefaultHubActivator : Microsoft.AspNetCore.SignalR.IHubActivator where THub : Microsoft.AspNetCore.SignalR.Hub - { - public DefaultHubActivator(System.IServiceProvider serviceProvider) { } - public virtual THub Create() { throw null; } - public virtual void Release(THub hub) { } - } - public partial class DefaultHubCallerContext : Microsoft.AspNetCore.SignalR.HubCallerContext - { - public DefaultHubCallerContext(Microsoft.AspNetCore.SignalR.HubConnectionContext connection) { } - public override System.Threading.CancellationToken ConnectionAborted { get { throw null; } } - public override string ConnectionId { get { throw null; } } - public override Microsoft.AspNetCore.Http.Features.IFeatureCollection Features { get { throw null; } } - public override System.Collections.Generic.IDictionary Items { get { throw null; } } - public override System.Security.Claims.ClaimsPrincipal User { get { throw null; } } - public override string UserIdentifier { get { throw null; } } - public override void Abort() { } - } - public partial class DefaultHubDispatcher : Microsoft.AspNetCore.SignalR.Internal.HubDispatcher where THub : Microsoft.AspNetCore.SignalR.Hub - { - public DefaultHubDispatcher(Microsoft.Extensions.DependencyInjection.IServiceScopeFactory serviceScopeFactory, Microsoft.AspNetCore.SignalR.IHubContext hubContext, Microsoft.Extensions.Options.IOptions> hubOptions, Microsoft.Extensions.Options.IOptions globalHubOptions, Microsoft.Extensions.Logging.ILogger> logger) { } - public override System.Threading.Tasks.Task DispatchMessageAsync(Microsoft.AspNetCore.SignalR.HubConnectionContext connection, Microsoft.AspNetCore.SignalR.Protocol.HubMessage hubMessage) { throw null; } - public override System.Collections.Generic.IReadOnlyList GetParameterTypes(string methodName) { throw null; } - [System.Diagnostics.DebuggerStepThroughAttribute] - public override System.Threading.Tasks.Task OnConnectedAsync(Microsoft.AspNetCore.SignalR.HubConnectionContext connection) { throw null; } - [System.Diagnostics.DebuggerStepThroughAttribute] - public override System.Threading.Tasks.Task OnDisconnectedAsync(Microsoft.AspNetCore.SignalR.HubConnectionContext connection, System.Exception exception) { throw null; } - } - public partial class DefaultHubProtocolResolver : Microsoft.AspNetCore.SignalR.IHubProtocolResolver - { - public DefaultHubProtocolResolver(System.Collections.Generic.IEnumerable availableProtocols, Microsoft.Extensions.Logging.ILogger logger) { } - public System.Collections.Generic.IReadOnlyList AllProtocols { get { throw null; } } - public virtual Microsoft.AspNetCore.SignalR.Protocol.IHubProtocol GetProtocol(string protocolName, System.Collections.Generic.IReadOnlyList supportedProtocols) { throw null; } - } - public partial class HubCallerClients : Microsoft.AspNetCore.SignalR.IHubCallerClients, Microsoft.AspNetCore.SignalR.IHubCallerClients, Microsoft.AspNetCore.SignalR.IHubClients - { - public HubCallerClients(Microsoft.AspNetCore.SignalR.IHubClients hubClients, string connectionId) { } - public Microsoft.AspNetCore.SignalR.IClientProxy All { get { throw null; } } - public Microsoft.AspNetCore.SignalR.IClientProxy Caller { get { throw null; } } - public Microsoft.AspNetCore.SignalR.IClientProxy Others { get { throw null; } } - public Microsoft.AspNetCore.SignalR.IClientProxy AllExcept(System.Collections.Generic.IReadOnlyList excludedConnectionIds) { throw null; } - public Microsoft.AspNetCore.SignalR.IClientProxy Client(string connectionId) { throw null; } - public Microsoft.AspNetCore.SignalR.IClientProxy Clients(System.Collections.Generic.IReadOnlyList connectionIds) { throw null; } - public Microsoft.AspNetCore.SignalR.IClientProxy Group(string groupName) { throw null; } - public Microsoft.AspNetCore.SignalR.IClientProxy GroupExcept(string groupName, System.Collections.Generic.IReadOnlyList excludedConnectionIds) { throw null; } - public Microsoft.AspNetCore.SignalR.IClientProxy Groups(System.Collections.Generic.IReadOnlyList groupNames) { throw null; } - public Microsoft.AspNetCore.SignalR.IClientProxy OthersInGroup(string groupName) { throw null; } - public Microsoft.AspNetCore.SignalR.IClientProxy User(string userId) { throw null; } - public Microsoft.AspNetCore.SignalR.IClientProxy Users(System.Collections.Generic.IReadOnlyList userIds) { throw null; } - } - public abstract partial class HubDispatcher where THub : Microsoft.AspNetCore.SignalR.Hub - { - protected HubDispatcher() { } - public abstract System.Threading.Tasks.Task DispatchMessageAsync(Microsoft.AspNetCore.SignalR.HubConnectionContext connection, Microsoft.AspNetCore.SignalR.Protocol.HubMessage hubMessage); - public abstract System.Collections.Generic.IReadOnlyList GetParameterTypes(string name); - public abstract System.Threading.Tasks.Task OnConnectedAsync(Microsoft.AspNetCore.SignalR.HubConnectionContext connection); - public abstract System.Threading.Tasks.Task OnDisconnectedAsync(Microsoft.AspNetCore.SignalR.HubConnectionContext connection, System.Exception exception); - } - public partial class HubOptionsSetup : Microsoft.Extensions.Options.IConfigureOptions - { - public HubOptionsSetup(System.Collections.Generic.IEnumerable protocols) { } - public void Configure(Microsoft.AspNetCore.SignalR.HubOptions options) { } - } - public partial class HubOptionsSetup : Microsoft.Extensions.Options.IConfigureOptions> where THub : Microsoft.AspNetCore.SignalR.Hub - { - public HubOptionsSetup(Microsoft.Extensions.Options.IOptions options) { } - public void Configure(Microsoft.AspNetCore.SignalR.HubOptions options) { } - } - public static partial class HubReflectionHelper - { - public static System.Collections.Generic.IEnumerable GetHubMethods(System.Type hubType) { throw null; } - } - public static partial class TypeBaseEnumerationExtensions - { - public static System.Collections.Generic.IEnumerable AllBaseTypes(this System.Type type) { throw null; } - } -} namespace Microsoft.Extensions.DependencyInjection { public static partial class SignalRDependencyInjectionExtensions diff --git a/src/SignalR/server/Core/src/HubConnectionHandler.cs b/src/SignalR/server/Core/src/HubConnectionHandler.cs index 708d2b56bd55..d3e2b4185c52 100644 --- a/src/SignalR/server/Core/src/HubConnectionHandler.cs +++ b/src/SignalR/server/Core/src/HubConnectionHandler.cs @@ -9,7 +9,9 @@ using Microsoft.AspNetCore.Connections; using Microsoft.AspNetCore.SignalR.Internal; using Microsoft.AspNetCore.SignalR.Protocol; +using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; namespace Microsoft.AspNetCore.SignalR @@ -39,7 +41,7 @@ public class HubConnectionHandler : ConnectionHandler where THub : Hub /// Hub specific options used to initialize hubs. These options override the global options. /// The logger factory. /// The user ID provider used to get the user ID from a hub connection. - /// The hub dispatcher used to dispatch incoming messages to hubs. + /// The service scope factory. /// This class is typically created via dependency injection. public HubConnectionHandler(HubLifetimeManager lifetimeManager, IHubProtocolResolver protocolResolver, @@ -47,10 +49,8 @@ public HubConnectionHandler(HubLifetimeManager lifetimeManager, IOptions> hubOptions, ILoggerFactory loggerFactory, IUserIdProvider userIdProvider, -#pragma warning disable PUB0001 // Pubternal type in public API - HubDispatcher dispatcher -#pragma warning restore PUB0001 - ) + IServiceScopeFactory serviceScopeFactory + ) { _protocolResolver = protocolResolver; _lifetimeManager = lifetimeManager; @@ -59,10 +59,16 @@ HubDispatcher dispatcher _globalHubOptions = globalHubOptions.Value; _logger = loggerFactory.CreateLogger>(); _userIdProvider = userIdProvider; - _dispatcher = dispatcher; _enableDetailedErrors = _hubOptions.EnableDetailedErrors ?? _globalHubOptions.EnableDetailedErrors ?? false; _maximumMessageSize = _hubOptions.MaximumReceiveMessageSize ?? _globalHubOptions.MaximumReceiveMessageSize; + + _dispatcher = new DefaultHubDispatcher( + serviceScopeFactory, + new HubContext(lifetimeManager), + hubOptions, + globalHubOptions, + new Logger>(loggerFactory)); } /// diff --git a/src/SignalR/server/Core/src/Internal/HubOptionsSetup.cs b/src/SignalR/server/Core/src/HubOptionsSetup.cs similarity index 97% rename from src/SignalR/server/Core/src/Internal/HubOptionsSetup.cs rename to src/SignalR/server/Core/src/HubOptionsSetup.cs index ad4f9e9ec4ff..8f1affe718fc 100644 --- a/src/SignalR/server/Core/src/Internal/HubOptionsSetup.cs +++ b/src/SignalR/server/Core/src/HubOptionsSetup.cs @@ -6,7 +6,7 @@ using Microsoft.AspNetCore.SignalR.Protocol; using Microsoft.Extensions.Options; -namespace Microsoft.AspNetCore.SignalR.Internal +namespace Microsoft.AspNetCore.SignalR { public class HubOptionsSetup : IConfigureOptions { diff --git a/src/SignalR/server/Core/src/Internal/HubOptionsSetup`T.cs b/src/SignalR/server/Core/src/HubOptionsSetup`T.cs similarity index 95% rename from src/SignalR/server/Core/src/Internal/HubOptionsSetup`T.cs rename to src/SignalR/server/Core/src/HubOptionsSetup`T.cs index f55810dd0302..6296ac3c5709 100644 --- a/src/SignalR/server/Core/src/Internal/HubOptionsSetup`T.cs +++ b/src/SignalR/server/Core/src/HubOptionsSetup`T.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using Microsoft.Extensions.Options; -namespace Microsoft.AspNetCore.SignalR.Internal +namespace Microsoft.AspNetCore.SignalR { public class HubOptionsSetup : IConfigureOptions> where THub : Hub { diff --git a/src/SignalR/server/Core/src/Internal/DefaultHubActivator.cs b/src/SignalR/server/Core/src/Internal/DefaultHubActivator.cs index 3bb8278b1dac..a699d3299fe7 100644 --- a/src/SignalR/server/Core/src/Internal/DefaultHubActivator.cs +++ b/src/SignalR/server/Core/src/Internal/DefaultHubActivator.cs @@ -1,4 +1,4 @@ -// 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; @@ -7,7 +7,7 @@ namespace Microsoft.AspNetCore.SignalR.Internal { - public class DefaultHubActivator : IHubActivator where THub: Hub + internal class DefaultHubActivator : IHubActivator where THub: Hub { // Object factory for THub instances private static readonly Lazy _objectFactory = new Lazy(() => ActivatorUtilities.CreateFactory(typeof(THub), Type.EmptyTypes)); diff --git a/src/SignalR/server/Core/src/Internal/DefaultHubCallerContext.cs b/src/SignalR/server/Core/src/Internal/DefaultHubCallerContext.cs index 1d3b93b23243..503e8110d3ce 100644 --- a/src/SignalR/server/Core/src/Internal/DefaultHubCallerContext.cs +++ b/src/SignalR/server/Core/src/Internal/DefaultHubCallerContext.cs @@ -1,8 +1,6 @@ // 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.Collections; -using System.Collections.Concurrent; using System.Collections.Generic; using System.Security.Claims; using System.Threading; @@ -13,7 +11,7 @@ namespace Microsoft.AspNetCore.SignalR.Internal /// /// A context for accessing information about the hub caller from their connection. /// - public class DefaultHubCallerContext : HubCallerContext + internal class DefaultHubCallerContext : HubCallerContext { private readonly HubConnectionContext _connection; diff --git a/src/SignalR/server/Core/src/Internal/DefaultHubDispatcher.Log.cs b/src/SignalR/server/Core/src/Internal/DefaultHubDispatcher.Log.cs index da5df4d2fd1c..0d241a19ae1e 100644 --- a/src/SignalR/server/Core/src/Internal/DefaultHubDispatcher.Log.cs +++ b/src/SignalR/server/Core/src/Internal/DefaultHubDispatcher.Log.cs @@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.SignalR.Internal { - public partial class DefaultHubDispatcher + internal partial class DefaultHubDispatcher { private static class Log { diff --git a/src/SignalR/server/Core/src/Internal/DefaultHubDispatcher.cs b/src/SignalR/server/Core/src/Internal/DefaultHubDispatcher.cs index 9f7d6ffe56af..86fe4b32ac67 100644 --- a/src/SignalR/server/Core/src/Internal/DefaultHubDispatcher.cs +++ b/src/SignalR/server/Core/src/Internal/DefaultHubDispatcher.cs @@ -20,7 +20,7 @@ namespace Microsoft.AspNetCore.SignalR.Internal { - public partial class DefaultHubDispatcher : HubDispatcher where THub : Hub + internal partial class DefaultHubDispatcher : HubDispatcher where THub : Hub { private readonly Dictionary _methods = new Dictionary(StringComparer.OrdinalIgnoreCase); private readonly IServiceScopeFactory _serviceScopeFactory; diff --git a/src/SignalR/server/Core/src/Internal/DefaultHubProtocolResolver.cs b/src/SignalR/server/Core/src/Internal/DefaultHubProtocolResolver.cs index b8bc13c21b2b..5475fd3f07a0 100644 --- a/src/SignalR/server/Core/src/Internal/DefaultHubProtocolResolver.cs +++ b/src/SignalR/server/Core/src/Internal/DefaultHubProtocolResolver.cs @@ -10,7 +10,7 @@ namespace Microsoft.AspNetCore.SignalR.Internal { - public class DefaultHubProtocolResolver : IHubProtocolResolver + internal class DefaultHubProtocolResolver : IHubProtocolResolver { private readonly ILogger _logger; private readonly List _hubProtocols; diff --git a/src/SignalR/server/Core/src/Internal/HubCallerClients.cs b/src/SignalR/server/Core/src/Internal/HubCallerClients.cs index d2694b17b3e9..a11491112123 100644 --- a/src/SignalR/server/Core/src/Internal/HubCallerClients.cs +++ b/src/SignalR/server/Core/src/Internal/HubCallerClients.cs @@ -1,11 +1,11 @@ -// 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.Collections.Generic; namespace Microsoft.AspNetCore.SignalR.Internal { - public class HubCallerClients : IHubCallerClients + internal class HubCallerClients : IHubCallerClients { private readonly string _connectionId; private readonly IHubClients _hubClients; diff --git a/src/SignalR/server/Core/src/Internal/HubDispatcher.cs b/src/SignalR/server/Core/src/Internal/HubDispatcher.cs index 9bd545da50f6..24e27ea1c2a0 100644 --- a/src/SignalR/server/Core/src/Internal/HubDispatcher.cs +++ b/src/SignalR/server/Core/src/Internal/HubDispatcher.cs @@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.SignalR.Internal { - public abstract class HubDispatcher where THub : Hub + internal abstract class HubDispatcher where THub : Hub { public abstract Task OnConnectedAsync(HubConnectionContext connection); public abstract Task OnDisconnectedAsync(HubConnectionContext connection, Exception exception); diff --git a/src/SignalR/server/Core/src/Internal/HubReflectionHelper.cs b/src/SignalR/server/Core/src/Internal/HubReflectionHelper.cs index eb1e272a66b9..a2fe4fa41c22 100644 --- a/src/SignalR/server/Core/src/Internal/HubReflectionHelper.cs +++ b/src/SignalR/server/Core/src/Internal/HubReflectionHelper.cs @@ -1,4 +1,4 @@ -// 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; @@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.SignalR.Internal { - public static class HubReflectionHelper + internal static class HubReflectionHelper { private static readonly Type[] _excludeInterfaces = new[] { typeof(IDisposable) }; diff --git a/src/SignalR/server/Core/src/Internal/TypeBaseEnumerationExtensions.cs b/src/SignalR/server/Core/src/Internal/TypeBaseEnumerationExtensions.cs index 70102b8624d1..62d506322e69 100644 --- a/src/SignalR/server/Core/src/Internal/TypeBaseEnumerationExtensions.cs +++ b/src/SignalR/server/Core/src/Internal/TypeBaseEnumerationExtensions.cs @@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.SignalR.Internal { - public static class TypeBaseEnumerationExtensions + internal static class TypeBaseEnumerationExtensions { public static IEnumerable AllBaseTypes(this Type type) { diff --git a/src/SignalR/server/Core/src/Properties/AssemblyInfo.cs b/src/SignalR/server/Core/src/Properties/AssemblyInfo.cs index 4d870535a2e9..95d162c8cee0 100644 --- a/src/SignalR/server/Core/src/Properties/AssemblyInfo.cs +++ b/src/SignalR/server/Core/src/Properties/AssemblyInfo.cs @@ -6,3 +6,4 @@ [assembly: InternalsVisibleTo("Microsoft.AspNetCore.SignalR.Tests.Utils, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.AspNetCore.SignalR.Microbenchmarks, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] [assembly: InternalsVisibleTo("Microsoft.AspNetCore.SignalR.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] diff --git a/src/SignalR/server/StackExchangeRedis/ref/Microsoft.AspNetCore.SignalR.StackExchangeRedis.netcoreapp3.0.cs b/src/SignalR/server/StackExchangeRedis/ref/Microsoft.AspNetCore.SignalR.StackExchangeRedis.netcoreapp3.0.cs index 0ad950b025f6..5610a423180e 100644 --- a/src/SignalR/server/StackExchangeRedis/ref/Microsoft.AspNetCore.SignalR.StackExchangeRedis.netcoreapp3.0.cs +++ b/src/SignalR/server/StackExchangeRedis/ref/Microsoft.AspNetCore.SignalR.StackExchangeRedis.netcoreapp3.0.cs @@ -29,47 +29,6 @@ public RedisOptions() { } public System.Func> ConnectionFactory { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } } } } -namespace Microsoft.AspNetCore.SignalR.StackExchangeRedis.Internal -{ - public enum GroupAction : byte - { - Add = (byte)1, - Remove = (byte)2, - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct RedisGroupCommand - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public RedisGroupCommand(int id, string serverName, Microsoft.AspNetCore.SignalR.StackExchangeRedis.Internal.GroupAction action, string groupName, string connectionId) { throw null; } - public Microsoft.AspNetCore.SignalR.StackExchangeRedis.Internal.GroupAction Action { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string ConnectionId { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string GroupName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public int Id { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public string ServerName { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct RedisInvocation - { - private readonly object _dummy; - public RedisInvocation(Microsoft.AspNetCore.SignalR.SerializedHubMessage message, System.Collections.Generic.IReadOnlyList excludedConnectionIds) { throw null; } - public System.Collections.Generic.IReadOnlyList ExcludedConnectionIds { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public Microsoft.AspNetCore.SignalR.SerializedHubMessage Message { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } } - public static Microsoft.AspNetCore.SignalR.StackExchangeRedis.Internal.RedisInvocation Create(string target, object[] arguments, System.Collections.Generic.IReadOnlyList excludedConnectionIds = null) { throw null; } - } - public partial class RedisProtocol - { - public RedisProtocol(System.Collections.Generic.IReadOnlyList protocols) { } - public int ReadAck(System.ReadOnlyMemory data) { throw null; } - public Microsoft.AspNetCore.SignalR.StackExchangeRedis.Internal.RedisGroupCommand ReadGroupCommand(System.ReadOnlyMemory data) { throw null; } - public Microsoft.AspNetCore.SignalR.StackExchangeRedis.Internal.RedisInvocation ReadInvocation(System.ReadOnlyMemory data) { throw null; } - public static Microsoft.AspNetCore.SignalR.SerializedHubMessage ReadSerializedHubMessage(ref System.ReadOnlyMemory data) { throw null; } - public byte[] WriteAck(int messageId) { throw null; } - public byte[] WriteGroupCommand(Microsoft.AspNetCore.SignalR.StackExchangeRedis.Internal.RedisGroupCommand command) { throw null; } - public byte[] WriteInvocation(string methodName, object[] args) { throw null; } - public byte[] WriteInvocation(string methodName, object[] args, System.Collections.Generic.IReadOnlyList excludedConnectionIds) { throw null; } - } -} namespace Microsoft.Extensions.DependencyInjection { public static partial class StackExchangeRedisDependencyInjectionExtensions diff --git a/src/SignalR/server/StackExchangeRedis/src/AssemblyInfo.cs b/src/SignalR/server/StackExchangeRedis/src/AssemblyInfo.cs new file mode 100644 index 000000000000..84cff6788523 --- /dev/null +++ b/src/SignalR/server/StackExchangeRedis/src/AssemblyInfo.cs @@ -0,0 +1,7 @@ +// 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.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] +[assembly: InternalsVisibleTo("Microsoft.AspNetCore.SignalR.Microbenchmarks, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f33a29044fa9d740c9b3213a93e57c84b472c84e0b8a0e1ae48e67a9f8f6de9d5f7f3d52ac23e48ac51801f1dc950abe901da34d2a9e3baadb141a17c77ef3c565dd5ee5054b91cf63bb3c6ab83f72ab3aafe93d0fc3c2348b764fafb0b1c0733de51459aeab46580384bf9d74c4e28164b7cde247f891ba07891c9d872ad2bb")] diff --git a/src/SignalR/server/StackExchangeRedis/src/Internal/GroupAction.cs b/src/SignalR/server/StackExchangeRedis/src/Internal/GroupAction.cs index e3aae4c00611..9648c7f6b782 100644 --- a/src/SignalR/server/StackExchangeRedis/src/Internal/GroupAction.cs +++ b/src/SignalR/server/StackExchangeRedis/src/Internal/GroupAction.cs @@ -5,7 +5,7 @@ namespace Microsoft.AspNetCore.SignalR.StackExchangeRedis.Internal { // The size of the enum is defined by the protocol. Do not change it. If you need more than 255 items, // add an additional enum. - public enum GroupAction : byte + internal enum GroupAction : byte { // These numbers are used by the protocol, do not change them and always use explicit assignment // when adding new items to this enum. 0 is intentionally omitted diff --git a/src/SignalR/server/StackExchangeRedis/src/Internal/RedisGroupCommand.cs b/src/SignalR/server/StackExchangeRedis/src/Internal/RedisGroupCommand.cs index 1cb155d4aa0b..556c7f9708d2 100644 --- a/src/SignalR/server/StackExchangeRedis/src/Internal/RedisGroupCommand.cs +++ b/src/SignalR/server/StackExchangeRedis/src/Internal/RedisGroupCommand.cs @@ -3,7 +3,7 @@ namespace Microsoft.AspNetCore.SignalR.StackExchangeRedis.Internal { - public readonly struct RedisGroupCommand + internal readonly struct RedisGroupCommand { /// /// Gets the ID of the group command. diff --git a/src/SignalR/server/StackExchangeRedis/src/Internal/RedisInvocation.cs b/src/SignalR/server/StackExchangeRedis/src/Internal/RedisInvocation.cs index aae0e88e596a..16dd911d1e88 100644 --- a/src/SignalR/server/StackExchangeRedis/src/Internal/RedisInvocation.cs +++ b/src/SignalR/server/StackExchangeRedis/src/Internal/RedisInvocation.cs @@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.SignalR.StackExchangeRedis.Internal { - public readonly struct RedisInvocation + internal readonly struct RedisInvocation { /// /// Gets a list of connections that should be excluded from this invocation. diff --git a/src/SignalR/server/StackExchangeRedis/src/Internal/RedisProtocol.cs b/src/SignalR/server/StackExchangeRedis/src/Internal/RedisProtocol.cs index 5185b946c956..a1594b0fd39b 100644 --- a/src/SignalR/server/StackExchangeRedis/src/Internal/RedisProtocol.cs +++ b/src/SignalR/server/StackExchangeRedis/src/Internal/RedisProtocol.cs @@ -12,7 +12,7 @@ namespace Microsoft.AspNetCore.SignalR.StackExchangeRedis.Internal { - public class RedisProtocol + internal class RedisProtocol { private readonly IReadOnlyList _protocols;