1 write to _collection
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
Http1\Http1HttpProtocolFeatureCollectionTests.cs (1)
46_collection = _http1Connection;
80 references to _collection
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (80)
Http1\Http1HttpProtocolFeatureCollectionTests.cs (80)
64foreach (var feature in _collection) 69Assert.Same(_collection[type], feature.Value); 70Assert.NotSame(_collection[type], _collection); 104_collection[typeof(IHttpRequestFeature)] = CreateHttp1Connection(); 105_collection[typeof(IHttpRequestBodyDetectionFeature)] = CreateHttp1Connection(); 106_collection[typeof(IHttpResponseFeature)] = CreateHttp1Connection(); 107_collection[typeof(IHttpResponseBodyFeature)] = CreateHttp1Connection(); 108_collection[typeof(IRequestBodyPipeFeature)] = CreateHttp1Connection(); 109_collection[typeof(IHttpRequestIdentifierFeature)] = CreateHttp1Connection(); 110_collection[typeof(IHttpRequestLifetimeFeature)] = CreateHttp1Connection(); 111_collection[typeof(IHttpRequestTrailersFeature)] = CreateHttp1Connection(); 112_collection[typeof(IHttpConnectionFeature)] = CreateHttp1Connection(); 113_collection[typeof(IHttpMaxRequestBodySizeFeature)] = CreateHttp1Connection(); 114_collection[typeof(IHttpMinRequestBodyDataRateFeature)] = CreateHttp1Connection(); 115_collection[typeof(IHttpMinResponseDataRateFeature)] = CreateHttp1Connection(); 116_collection[typeof(IHttpBodyControlFeature)] = CreateHttp1Connection(); 117_collection[typeof(IRouteValuesFeature)] = CreateHttp1Connection(); 118_collection[typeof(IEndpointFeature)] = CreateHttp1Connection(); 119_collection[typeof(IHttpExtendedConnectFeature)] = CreateHttp1Connection(); 120_collection[typeof(IHttpUpgradeFeature)] = CreateHttp1Connection(); 121_collection[typeof(IPersistentStateFeature)] = CreateHttp1Connection(); 123_collection.Set<IHttpWebTransportFeature>(CreateHttp1Connection()); 134_collection.Set<IHttpRequestFeature>(CreateHttp1Connection()); 135_collection.Set<IHttpRequestBodyDetectionFeature>(CreateHttp1Connection()); 136_collection.Set<IHttpResponseFeature>(CreateHttp1Connection()); 137_collection.Set<IHttpResponseBodyFeature>(CreateHttp1Connection()); 138_collection.Set<IRequestBodyPipeFeature>(CreateHttp1Connection()); 139_collection.Set<IHttpRequestIdentifierFeature>(CreateHttp1Connection()); 140_collection.Set<IHttpRequestLifetimeFeature>(CreateHttp1Connection()); 141_collection.Set<IHttpRequestTrailersFeature>(CreateHttp1Connection()); 142_collection.Set<IHttpConnectionFeature>(CreateHttp1Connection()); 143_collection.Set<IHttpMaxRequestBodySizeFeature>(CreateHttp1Connection()); 144_collection.Set<IHttpMinRequestBodyDataRateFeature>(CreateHttp1Connection()); 145_collection.Set<IHttpMinResponseDataRateFeature>(CreateHttp1Connection()); 146_collection.Set<IHttpBodyControlFeature>(CreateHttp1Connection()); 147_collection.Set<IRouteValuesFeature>(CreateHttp1Connection()); 148_collection.Set<IEndpointFeature>(CreateHttp1Connection()); 149_collection.Set<IHttpExtendedConnectFeature>(CreateHttp1Connection()); 150_collection.Set<IHttpUpgradeFeature>(CreateHttp1Connection()); 151_collection.Set<IPersistentStateFeature>(CreateHttp1Connection()); 153_collection.Set<IHttpWebTransportFeature>(CreateHttp1Connection()); 164Assert.NotNull(_collection.Get<IHttpMinResponseDataRateFeature>()); 170_collection[typeof(string)] = null; 171Assert.Equal(0, _collection.Count(kv => kv.Key == typeof(string))); 173_collection[typeof(string)] = "A string"; 174Assert.Equal(1, _collection.Count(kv => kv.Key == typeof(string))); 176_collection[typeof(string)] = null; 177Assert.Equal(0, _collection.Count(kv => kv.Key == typeof(string))); 182Assert.Same(_collection.Get<IHttpRequestFeature>(), _collection[typeof(IHttpRequestFeature)]); 183Assert.Same(_collection.Get<IHttpRequestBodyDetectionFeature>(), _collection[typeof(IHttpRequestBodyDetectionFeature)]); 184Assert.Same(_collection.Get<IHttpResponseFeature>(), _collection[typeof(IHttpResponseFeature)]); 185Assert.Same(_collection.Get<IHttpResponseBodyFeature>(), _collection[typeof(IHttpResponseBodyFeature)]); 186Assert.Same(_collection.Get<IRequestBodyPipeFeature>(), _collection[typeof(IRequestBodyPipeFeature)]); 187Assert.Same(_collection.Get<IHttpRequestIdentifierFeature>(), _collection[typeof(IHttpRequestIdentifierFeature)]); 188Assert.Same(_collection.Get<IHttpRequestLifetimeFeature>(), _collection[typeof(IHttpRequestLifetimeFeature)]); 189Assert.Same(_collection.Get<IHttpConnectionFeature>(), _collection[typeof(IHttpConnectionFeature)]); 190Assert.Same(_collection.Get<IHttpMaxRequestBodySizeFeature>(), _collection[typeof(IHttpMaxRequestBodySizeFeature)]); 191Assert.Same(_collection.Get<IHttpMinRequestBodyDataRateFeature>(), _collection[typeof(IHttpMinRequestBodyDataRateFeature)]); 192Assert.Same(_collection.Get<IHttpMinResponseDataRateFeature>(), _collection[typeof(IHttpMinResponseDataRateFeature)]); 193Assert.Same(_collection.Get<IHttpBodyControlFeature>(), _collection[typeof(IHttpBodyControlFeature)]); 199foreach (var item in _collection) 204var matches = _collection.Where(kv => ReferenceEquals(kv.Value, item.Value)).ToList(); 226foreach (var featureIter in _collection) 231var featureLookup = _collection[type]; 233Assert.Same(featureLookup, _collection); 243foreach (var feature in _collection) 248_collection[type] = CreateHttp1Connection();