1 write to _availableHttp2Connections
System.Net.Http (1)
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http2.cs (1)
429_availableHttp2Connections ??= new List<Http2Connection>();
31 references to _availableHttp2Connections
System.Net.Http (31)
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (9)
924if (_availableHttp2Connections is not null) 926toDispose = [.. _availableHttp2Connections]; 927_associatedHttp2ConnectionCount -= _availableHttp2Connections.Count; 928_availableHttp2Connections.Clear(); 952Debug.Assert((_availableHttp2Connections?.Count ?? 0) == 0, $"Expected {nameof(_availableHttp2Connections)}.{nameof(_availableHttp2Connections.Count)} == 0"); 999if (_availableHttp2Connections is not null) 1001int removed = ScavengeHttp2ConnectionList(_availableHttp2Connections, ref toDispose, nowTicks, pooledConnectionLifetime, pooledConnectionIdleTimeout);
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http2.cs (22)
80int availableConnectionCount = _availableHttp2Connections?.Count ?? 0; 85connection = _availableHttp2Connections![availableConnectionCount - 1]; 116int index = _availableHttp2Connections.IndexOf(connection); 120_availableHttp2Connections.RemoveAt(index); 145int availableHttp2ConnectionCount = _availableHttp2Connections?.Count ?? 0; 374Debug.Assert(_availableHttp2Connections is null || !_availableHttp2Connections.Contains(connection)); 375Debug.Assert(_associatedHttp2ConnectionCount > (_availableHttp2Connections?.Count ?? 0)); 393Debug.Assert(_availableHttp2Connections is null || !_availableHttp2Connections.Contains(connection), $"HTTP2 connection already in available list"); 394Debug.Assert(_associatedHttp2ConnectionCount > (_availableHttp2Connections?.Count ?? 0), 395$"Expected _associatedHttp2ConnectionCount={_associatedHttp2ConnectionCount} > _availableHttp2Connections.Count={(_availableHttp2Connections?.Count ?? 0)}"); 417Debug.Assert((_availableHttp2Connections?.Count ?? 0) == 0, $"With {(_availableHttp2Connections?.Count ?? 0)} available HTTP2 connections, we shouldn't have a waiter."); 430_availableHttp2Connections.Add(connection); 518Debug.Assert(_availableHttp2Connections is null || !_availableHttp2Connections.Contains(connection)); 542if (_availableHttp2Connections is not null) 544Debug.Assert(_associatedHttp2ConnectionCount >= _availableHttp2Connections.Count); 546int index = _availableHttp2Connections.IndexOf(connection); 550_availableHttp2Connections.RemoveAt(index); 571localHttp2Connections = _availableHttp2Connections?.ToArray();