1 instantiation of HttpConnectionContext
Microsoft.AspNetCore.Http.Connections (1)
Internal\HttpConnectionManager.cs (1)
157
var connection = new
HttpConnectionContext
(
55 references to HttpConnectionContext
Microsoft.AspNetCore.Http.Connections (55)
Internal\HttpConnectionContext.cs (3)
1228
HttpConnectionContext
connection,
1232
private
HttpConnectionContext
? _connection = connection;
1244
var
connection = Interlocked.Exchange(ref _connection, null);
Internal\HttpConnectionDispatcher.cs (30)
70
HttpConnectionContext
? connectionContext = null;
169
if (!_manager.TryGetConnection(connectionToken.ToString(), endpointMetadata, out
var
connection))
219
if (updateResult ==
HttpConnectionContext
.UserUpdateResult.Rejected)
226
else if (updateResult ==
HttpConnectionContext
.UserUpdateResult.AdditionalPolicyRejected)
237
if (updateResult !=
HttpConnectionContext
.UserUpdateResult.Updated
321
var
connection = await GetConnectionAsync(context, endpointMetadata);
351
HttpConnectionContext
? connection;
514
private async Task DoPersistentConnection(
HttpConnectionContext
connection)
565
HttpConnectionContext
? connection = null;
678
var
connection = await GetConnectionAsync(context, endpointMetadata);
783
var
connection = await GetConnectionAsync(context, endpointMetadata);
814
private async Task<bool> EnsureConnectionStateAsync(
HttpConnectionContext
connection, HttpContext context, HttpTransportType transportType, HttpTransportType supportedTransports, ConnectionLogScope logScope, HttpConnectionDispatcherOptions options)
834
case
HttpConnectionContext
.SetTransportState.Success:
837
case
HttpConnectionContext
.SetTransportState.AlreadyActive:
845
case
HttpConnectionContext
.SetTransportState.CannotChange:
877
var principalChanged = !
HttpConnectionContext
.ClaimsPrincipalContentEquals(currentUser, newPrincipal)
896
if (updateResult ==
HttpConnectionContext
.UserUpdateResult.Rejected)
901
else if (updateResult ==
HttpConnectionContext
.UserUpdateResult.AdditionalPolicyRejected)
909
userRefreshApplied = updateResult ==
HttpConnectionContext
.UserUpdateResult.Updated;
995
private static void UpdateExpiration(
HttpConnectionContext
connection, HttpContext context, HttpConnectionDispatcherOptions options)
1008
private static DateTimeOffset GetAuthenticationExpiration(
HttpConnectionContext
connection, HttpContext context, HttpConnectionDispatcherOptions options)
1058
newContext.User =
HttpConnectionContext
.CloneUserIfNeeded(oldContext.User, out _);
1061
private static void CloneHttpContext(HttpContext context,
HttpConnectionContext
connection)
1127
private async Task<bool> RejectIfConnectionUserChangedAsync(
HttpConnectionContext
connection, HttpContext context)
1153
private async Task<
HttpConnectionContext
?> GetConnectionAsync(HttpContext context, HttpConnectionEndpointMetadata? endpointMetadata)
1167
if (!_manager.TryGetConnection(connectionToken.ToString(), endpointMetadata, out
var
connection))
1180
private async Task<
HttpConnectionContext
?> GetOrCreateConnectionAsync(
1186
HttpConnectionContext
? connection;
1205
private
HttpConnectionContext
CreateConnection(
1214
private
HttpConnectionContext
CreateConnection(
Internal\HttpConnectionManager.cs (16)
23
private readonly ConcurrentDictionary<string,
HttpConnectionContext
> _connections =
24
new ConcurrentDictionary<string,
HttpConnectionContext
>(StringComparer.Ordinal);
27
private readonly ILogger<
HttpConnectionContext
> _connectionLogger;
34
_connectionLogger = loggerFactory.CreateLogger<
HttpConnectionContext
>();
51
internal bool TryGetConnection(string id, [NotNullWhen(true)] out
HttpConnectionContext
? connection)
56
internal bool TryGetConnection(string id, HttpConnectionEndpointMetadata? endpointMetadata, [NotNullWhen(true)] out
HttpConnectionContext
? connection)
68
internal
HttpConnectionContext
CreateConnection()
77
internal
HttpConnectionContext
CreateConnection(
92
internal
HttpConnectionContext
CreateConnection(
104
internal
HttpConnectionContext
CreateConnection(
117
internal
HttpConnectionContext
CreateConnection(
133
private
HttpConnectionContext
CreateConnection(
157
var
connection = new HttpConnectionContext(
180
if (_connections.TryRemove(id, out
var
connection))
238
var
connection = c.Value;
292
internal async Task DisposeAndRemoveAsync(
HttpConnectionContext
connection, bool closeGracefully, HttpConnectionStopStatus status)
Internal\Transports\LongPollingServerTransport.cs (2)
15
private readonly
HttpConnectionContext
? _connection;
21
public LongPollingServerTransport(CancellationToken timeoutToken, PipeReader application, ILoggerFactory loggerFactory,
HttpConnectionContext
? connection)
Internal\Transports\ServerSentEventsServerTransport.cs (2)
15
private readonly
HttpConnectionContext
? _connection;
21
public ServerSentEventsServerTransport(PipeReader application, string connectionId,
HttpConnectionContext
? connection, ILoggerFactory loggerFactory)
Internal\Transports\WebSocketsServerTransport.cs (2)
17
private readonly
HttpConnectionContext
_connection;
23
public WebSocketsServerTransport(WebSocketOptions options, IDuplexPipe application,
HttpConnectionContext
connection, ILoggerFactory loggerFactory)