13 implementations of
InMemory.FunctionalTests (1)
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (1)
126object? IFeatureCollection.this[Type key]
Microsoft.AspNetCore.Hosting.Tests (2)
HostingApplicationTests.cs (1)
214public object this[Type key] { get => Features[key]; set => Features[key] = value; }
WebHostTests.cs (1)
1306public object this[Type key]
Microsoft.AspNetCore.Owin (1)
OwinFeatureCollection.cs (1)
337public object this[Type key]
Microsoft.AspNetCore.Server.HttpSys (1)
StandardFeatureCollection.cs (1)
70public object? this[Type key]
Microsoft.AspNetCore.Server.IIS (1)
Core\IISHttpContext.FeatureCollection.cs (1)
310object? IFeatureCollection.this[Type key]
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\Http\HttpProtocol.Generated.cs (1)
187object? IFeatureCollection.this[Type key]
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (1)
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (1)
126object? IFeatureCollection.this[Type key]
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (1)
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (1)
126object? IFeatureCollection.this[Type key]
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (2)
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (1)
126object? IFeatureCollection.this[Type key]
src\Servers\Kestrel\shared\TransportMultiplexedConnection.Generated.cs (1)
113object? IFeatureCollection.this[Type key]
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (1)
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (1)
126object? IFeatureCollection.this[Type key]
Microsoft.Extensions.Features (1)
FeatureCollection.cs (1)
64public object? this[Type key]
25 writes to
Microsoft.AspNetCore.Hosting.Tests (1)
HostingApplicationTests.cs (1)
214public object this[Type key] { get => Features[key]; set => Features[key] = value; }
Microsoft.AspNetCore.Owin (1)
OwinEnvironment.cs (1)
416context.Features[FeatureInterface] = feature;
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (22)
Http1\Http1HttpProtocolFeatureCollectionTests.cs (22)
112_collection[typeof(IHttpRequestFeature)] = CreateHttp1Connection(); 113_collection[typeof(IHttpRequestBodyDetectionFeature)] = CreateHttp1Connection(); 114_collection[typeof(IHttpResponseFeature)] = CreateHttp1Connection(); 115_collection[typeof(IHttpResponseBodyFeature)] = CreateHttp1Connection(); 116_collection[typeof(IRequestBodyPipeFeature)] = CreateHttp1Connection(); 117_collection[typeof(IHttpRequestIdentifierFeature)] = CreateHttp1Connection(); 118_collection[typeof(IHttpRequestLifetimeFeature)] = CreateHttp1Connection(); 119_collection[typeof(IHttpRequestTrailersFeature)] = CreateHttp1Connection(); 120_collection[typeof(IHttpConnectionFeature)] = CreateHttp1Connection(); 121_collection[typeof(IHttpMaxRequestBodySizeFeature)] = CreateHttp1Connection(); 122_collection[typeof(IHttpMinRequestBodyDataRateFeature)] = CreateHttp1Connection(); 123_collection[typeof(IHttpMinResponseDataRateFeature)] = CreateHttp1Connection(); 124_collection[typeof(IHttpBodyControlFeature)] = CreateHttp1Connection(); 125_collection[typeof(IRouteValuesFeature)] = CreateHttp1Connection(); 126_collection[typeof(IEndpointFeature)] = CreateHttp1Connection(); 127_collection[typeof(IHttpExtendedConnectFeature)] = CreateHttp1Connection(); 128_collection[typeof(IHttpUpgradeFeature)] = CreateHttp1Connection(); 129_collection[typeof(IPersistentStateFeature)] = CreateHttp1Connection(); 178_collection[typeof(string)] = null; 181_collection[typeof(string)] = "A string"; 184_collection[typeof(string)] = null; 239_collection[type] = CreateHttp1Connection();
Microsoft.Extensions.Features (1)
FeatureReference.cs (1)
50features[typeof(T)] = feature;
24 references to
Microsoft.AspNetCore.Hosting.Tests (1)
HostingApplicationTests.cs (1)
214public object this[Type key] { get => Features[key]; set => Features[key] = value; }
Microsoft.AspNetCore.Http.Tests (2)
DefaultHttpContextTests.cs (2)
384Assert.Same(features[field.FieldType], v); 404Assert.Same(features[property.PropertyType], v);
Microsoft.AspNetCore.Mvc.Core.Test (1)
Routing\MvcRouteHandlerTests.cs (1)
112.Setup(h => h.Features[typeof(IRoutingFeature)])
Microsoft.AspNetCore.Owin (2)
OwinEnvironment.cs (2)
390object featureInstance = context.Features[FeatureInterface]; 406var feature = context.Features[FeatureInterface];
Microsoft.AspNetCore.Owin.Tests (1)
OwinFeatureCollectionTests.cs (1)
13return (T)features[typeof(T)];
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (15)
Http1\Http1HttpProtocolFeatureCollectionTests.cs (15)
51var featureLookup = _collection[type]; 75Assert.Same(_collection[type], feature.Value); 76Assert.NotSame(_collection[type], _collection); 190Assert.Same(_collection.Get<IHttpRequestFeature>(), _collection[typeof(IHttpRequestFeature)]); 191Assert.Same(_collection.Get<IHttpRequestBodyDetectionFeature>(), _collection[typeof(IHttpRequestBodyDetectionFeature)]); 192Assert.Same(_collection.Get<IHttpResponseFeature>(), _collection[typeof(IHttpResponseFeature)]); 193Assert.Same(_collection.Get<IHttpResponseBodyFeature>(), _collection[typeof(IHttpResponseBodyFeature)]); 194Assert.Same(_collection.Get<IRequestBodyPipeFeature>(), _collection[typeof(IRequestBodyPipeFeature)]); 195Assert.Same(_collection.Get<IHttpRequestIdentifierFeature>(), _collection[typeof(IHttpRequestIdentifierFeature)]); 196Assert.Same(_collection.Get<IHttpRequestLifetimeFeature>(), _collection[typeof(IHttpRequestLifetimeFeature)]); 197Assert.Same(_collection.Get<IHttpConnectionFeature>(), _collection[typeof(IHttpConnectionFeature)]); 198Assert.Same(_collection.Get<IHttpMaxRequestBodySizeFeature>(), _collection[typeof(IHttpMaxRequestBodySizeFeature)]); 199Assert.Same(_collection.Get<IHttpMinRequestBodyDataRateFeature>(), _collection[typeof(IHttpMinRequestBodyDataRateFeature)]); 200Assert.Same(_collection.Get<IHttpMinResponseDataRateFeature>(), _collection[typeof(IHttpMinResponseDataRateFeature)]); 201Assert.Same(_collection.Get<IHttpBodyControlFeature>(), _collection[typeof(IHttpBodyControlFeature)]);
Microsoft.Extensions.Features (2)
FeatureCollectionExtensions.cs (1)
41return featureCollection[key] ?? throw new InvalidOperationException($"Feature '{key}' is not present.");
FeatureReference.cs (1)
37_feature = (T?)features[typeof(T)];