1 write to _connectionContext
Microsoft.AspNetCore.SignalR.Microbenchmarks (1)
DefaultHubDispatcherBenchmark.cs (1)
50_connectionContext = new NoErrorHubConnectionContext(connection, contextOptions, NullLoggerFactory.Instance);
56 references to _connectionContext
Microsoft.AspNetCore.SignalR.Microbenchmarks (56)
DefaultHubDispatcherBenchmark.cs (56)
52_connectionContext.Protocol = new FakeHubProtocol(); 215return _dispatcher.DispatchMessageAsync(_connectionContext, new InvocationMessage("123", "Invocation", Array.Empty<object>())); 221return _dispatcher.DispatchMessageAsync(_connectionContext, new InvocationMessage("123", "InvocationAsync", Array.Empty<object>())); 227return _dispatcher.DispatchMessageAsync(_connectionContext, new InvocationMessage("123", "InvocationReturnValue", Array.Empty<object>())); 233return _dispatcher.DispatchMessageAsync(_connectionContext, new InvocationMessage("123", "InvocationReturnAsync", Array.Empty<object>())); 239return _dispatcher.DispatchMessageAsync(_connectionContext, new InvocationMessage("123", "InvocationValueTaskAsync", Array.Empty<object>())); 245return _dispatcher.DispatchMessageAsync(_connectionContext, new StreamInvocationMessage("123", "StreamChannelReader", Array.Empty<object>())); 251return _dispatcher.DispatchMessageAsync(_connectionContext, new StreamInvocationMessage("123", "StreamChannelReaderAsync", Array.Empty<object>())); 257return _dispatcher.DispatchMessageAsync(_connectionContext, new StreamInvocationMessage("123", "StreamChannelReaderValueTaskAsync", Array.Empty<object>())); 263await _dispatcher.DispatchMessageAsync(_connectionContext, new StreamInvocationMessage("123", "StreamChannelReaderCount", new object[] { 0 })); 265await (_connectionContext as NoErrorHubConnectionContext).ReceivedCompleted.Task; 266(_connectionContext as NoErrorHubConnectionContext).ReceivedCompleted = new TaskCompletionSource(); 272await _dispatcher.DispatchMessageAsync(_connectionContext, new StreamInvocationMessage("123", "StreamIAsyncEnumerableCount", new object[] { 0 })); 274await (_connectionContext as NoErrorHubConnectionContext).ReceivedCompleted.Task; 275(_connectionContext as NoErrorHubConnectionContext).ReceivedCompleted = new TaskCompletionSource(); 281await _dispatcher.DispatchMessageAsync(_connectionContext, new StreamInvocationMessage("123", "StreamIAsyncEnumerableCountCompletedTask", new object[] { 0 })); 283await (_connectionContext as NoErrorHubConnectionContext).ReceivedCompleted.Task; 284(_connectionContext as NoErrorHubConnectionContext).ReceivedCompleted = new TaskCompletionSource(); 290await _dispatcher.DispatchMessageAsync(_connectionContext, new StreamInvocationMessage("123", "StreamChannelReaderCount", new object[] { 1 })); 292await (_connectionContext as NoErrorHubConnectionContext).ReceivedCompleted.Task; 293(_connectionContext as NoErrorHubConnectionContext).ReceivedCompleted = new TaskCompletionSource(); 299await _dispatcher.DispatchMessageAsync(_connectionContext, new StreamInvocationMessage("123", "StreamIAsyncEnumerableCount", new object[] { 1 })); 301await (_connectionContext as NoErrorHubConnectionContext).ReceivedCompleted.Task; 302(_connectionContext as NoErrorHubConnectionContext).ReceivedCompleted = new TaskCompletionSource(); 308await _dispatcher.DispatchMessageAsync(_connectionContext, new StreamInvocationMessage("123", "StreamIAsyncEnumerableCountCompletedTask", new object[] { 1 })); 310await (_connectionContext as NoErrorHubConnectionContext).ReceivedCompleted.Task; 311(_connectionContext as NoErrorHubConnectionContext).ReceivedCompleted = new TaskCompletionSource(); 317await _dispatcher.DispatchMessageAsync(_connectionContext, new StreamInvocationMessage("123", "StreamChannelReaderCount", new object[] { 1000 })); 319await (_connectionContext as NoErrorHubConnectionContext).ReceivedCompleted.Task; 320(_connectionContext as NoErrorHubConnectionContext).ReceivedCompleted = new TaskCompletionSource(); 326await _dispatcher.DispatchMessageAsync(_connectionContext, new StreamInvocationMessage("123", "StreamIAsyncEnumerableCount", new object[] { 1000 })); 328await (_connectionContext as NoErrorHubConnectionContext).ReceivedCompleted.Task; 329(_connectionContext as NoErrorHubConnectionContext).ReceivedCompleted = new TaskCompletionSource(); 335await _dispatcher.DispatchMessageAsync(_connectionContext, new StreamInvocationMessage("123", "StreamIAsyncEnumerableCountCompletedTask", new object[] { 1000 })); 337await (_connectionContext as NoErrorHubConnectionContext).ReceivedCompleted.Task; 338(_connectionContext as NoErrorHubConnectionContext).ReceivedCompleted = new TaskCompletionSource(); 344await _dispatcher.DispatchMessageAsync(_connectionContext, new InvocationMessage("123", nameof(TestHub.UploadStream), Array.Empty<object>(), streamIds: new string[] { "1" })); 345await _dispatcher.DispatchMessageAsync(_connectionContext, new StreamItemMessage("1", "test")); 346await _dispatcher.DispatchMessageAsync(_connectionContext, CompletionMessage.Empty("1")); 348await (_connectionContext as NoErrorHubConnectionContext).ReceivedCompleted.Task; 349(_connectionContext as NoErrorHubConnectionContext).ReceivedCompleted = new TaskCompletionSource(); 355await _dispatcher.DispatchMessageAsync(_connectionContext, new InvocationMessage("123", nameof(TestHub.UploadStreamIAsynEnumerable), Array.Empty<object>(), streamIds: new string[] { "1" })); 356await _dispatcher.DispatchMessageAsync(_connectionContext, new StreamItemMessage("1", "test")); 357await _dispatcher.DispatchMessageAsync(_connectionContext, CompletionMessage.Empty("1")); 359await (_connectionContext as NoErrorHubConnectionContext).ReceivedCompleted.Task; 360(_connectionContext as NoErrorHubConnectionContext).ReceivedCompleted = new TaskCompletionSource(); 366await _dispatcher.DispatchMessageAsync(_connectionContext, new InvocationMessage("123", nameof(TestHub.UploadStream), Array.Empty<object>(), streamIds: new string[] { "1" })); 369await _dispatcher.DispatchMessageAsync(_connectionContext, new StreamItemMessage("1", "test")); 371await _dispatcher.DispatchMessageAsync(_connectionContext, CompletionMessage.Empty("1")); 373await (_connectionContext as NoErrorHubConnectionContext).ReceivedCompleted.Task; 374(_connectionContext as NoErrorHubConnectionContext).ReceivedCompleted = new TaskCompletionSource(); 380await _dispatcher.DispatchMessageAsync(_connectionContext, new InvocationMessage("123", nameof(TestHub.UploadStreamIAsynEnumerable), Array.Empty<object>(), streamIds: new string[] { "1" })); 383await _dispatcher.DispatchMessageAsync(_connectionContext, new StreamItemMessage("1", "test")); 385await _dispatcher.DispatchMessageAsync(_connectionContext, CompletionMessage.Empty("1")); 387await (_connectionContext as NoErrorHubConnectionContext).ReceivedCompleted.Task; 388(_connectionContext as NoErrorHubConnectionContext).ReceivedCompleted = new TaskCompletionSource();