26 overrides of Features
ClientSample (1)
Tcp\TcpConnection.cs (1)
42public override IFeatureCollection Features { get; } = new FeatureCollection();
InMemory.FunctionalTests (4)
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (2)
1014public override IFeatureCollection Features { get; } 1177public override IFeatureCollection Features { get; }
src\Servers\Kestrel\shared\test\TestContextFactory.cs (1)
238public override IFeatureCollection Features { get; }
src\Servers\Kestrel\shared\TransportConnection.cs (1)
36public override IFeatureCollection Features => this;
Microsoft.AspNetCore.Connections.Abstractions (1)
DefaultConnectionContext.cs (1)
75public override IFeatureCollection Features { get; }
Microsoft.AspNetCore.Http.Connections (1)
Internal\HttpConnectionContext.cs (1)
164public override IFeatureCollection Features { get; }
Microsoft.AspNetCore.Http.Connections.Client (1)
HttpConnection.cs (1)
71public override IFeatureCollection Features { get; } = new FeatureCollection();
Microsoft.AspNetCore.Server.Kestrel.Core (4)
HttpsConfigurationService.cs (1)
205public override IFeatureCollection Features => _inner.Features;
Internal\WebTransport\WebTransportStream.cs (1)
32public override IFeatureCollection Features => _features;
Middleware\LoggingMultiplexedConnectionMiddleware.cs (2)
44public override IFeatureCollection Features => _inner.Features; 121public override IFeatureCollection Features => _inner.Features;
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
SniOptionsSelectorTests.cs (1)
941public override IFeatureCollection Features { get; } = new FeatureCollection();
src\Servers\Kestrel\shared\test\TestContextFactory.cs (1)
238public override IFeatureCollection Features { get; }
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (4)
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (2)
1014public override IFeatureCollection Features { get; } 1177public override IFeatureCollection Features { get; }
src\Servers\Kestrel\shared\test\TestContextFactory.cs (1)
238public override IFeatureCollection Features { get; }
src\Servers\Kestrel\shared\TransportConnection.cs (1)
36public override IFeatureCollection Features => this;
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (1)
src\Servers\Kestrel\shared\TransportConnection.cs (1)
36public override IFeatureCollection Features => this;
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (2)
src\Servers\Kestrel\shared\TransportConnection.cs (1)
36public override IFeatureCollection Features => this;
src\Servers\Kestrel\shared\TransportMultiplexedConnection.cs (1)
30public override IFeatureCollection Features => this;
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (1)
src\Servers\Kestrel\shared\TransportConnection.cs (1)
36public override IFeatureCollection Features => this;
Microsoft.AspNetCore.SignalR.Client.Tests (2)
HubConnectionTests.Reconnect.cs (1)
1177public override IFeatureCollection Features => _inner.Features;
TestConnection.cs (1)
41public override IFeatureCollection Features { get; } = new FeatureCollection();
Microsoft.AspNetCore.SignalR.Microbenchmarks (1)
Shared\TestConnectionContext.cs (1)
13public override IFeatureCollection Features { get; } = new FeatureCollection();
Microsoft.AspNetCore.SignalR.Tests (1)
Internal\MessageBufferTests.cs (1)
501public override IFeatureCollection Features { get; } = new FeatureCollection();
85 references to Features
http2cat (1)
src\Shared\Http2cat\Http2CatHostedService.cs (1)
86var memoryPool = context.Features.Get<IMemoryPoolFeature>()?.MemoryPool;
Http2SampleApp (1)
Program.cs (1)
46var tlsFeature = context.Features.Get<ITlsHandshakeFeature>();
IIS.FunctionalTests (1)
src\Shared\Http2cat\Http2CatHostedService.cs (1)
86var memoryPool = context.Features.Get<IMemoryPoolFeature>()?.MemoryPool;
IIS.LongTests (1)
src\Shared\Http2cat\Http2CatHostedService.cs (1)
86var memoryPool = context.Features.Get<IMemoryPoolFeature>()?.MemoryPool;
IIS.NewHandler.FunctionalTests (1)
src\Shared\Http2cat\Http2CatHostedService.cs (1)
86var memoryPool = context.Features.Get<IMemoryPoolFeature>()?.MemoryPool;
IIS.NewShim.FunctionalTests (1)
src\Shared\Http2cat\Http2CatHostedService.cs (1)
86var memoryPool = context.Features.Get<IMemoryPoolFeature>()?.MemoryPool;
IISExpress.FunctionalTests (1)
src\Shared\Http2cat\Http2CatHostedService.cs (1)
86var memoryPool = context.Features.Get<IMemoryPoolFeature>()?.MemoryPool;
InMemory.FunctionalTests (11)
Http2\Http2TestBase.cs (1)
462_mockConnectionContext.Setup(x => x.Features).Returns(features);
Http3\Http3ConnectionTests.cs (2)
466var http3Stream1 = (Http3Stream)streamContext1.Features.Get<IPersistentStateFeature>().State[Http3Connection.StreamPersistentStateKey]; 473var http3Stream2 = (Http3Stream)streamContext2.Features.Get<IPersistentStateFeature>().State[Http3Connection.StreamPersistentStateKey];
Http3\WebTransport\WebTransportStreamTests.cs (1)
23var streamDirectionFeature = stream.Features.GetRequiredFeature<IStreamDirectionFeature>();
HttpsConnectionMiddlewareTests.cs (3)
307Assert.NotNull(connection.Features.Get<SslStream>()); 371Assert.NotNull(connection.Features.Get<SslStream>()); 444Assert.NotNull(connection.Features.Get<SslStream>());
KestrelMetricsTests.cs (4)
37connectionContext.Features.Get<IConnectionMetricsTagsFeature>().Tags.Add(new KeyValuePair<string, object>("custom", "value!")); 100hasConnectionMetricsTagsFeature = connectionContext.Features.Get<IConnectionMetricsTagsFeature>() != null; 160connectionContext.Features.Get<IConnectionMetricsTagsFeature>().Tags.Add(new KeyValuePair<string, object>("custom", "value!")); 194Assert.NotEqual(overridenFeature, currentConnectionContext.Features.Get<IConnectionMetricsTagsFeature>());
Microsoft.AspNetCore.Connections.Abstractions (1)
ConnectionContext.cs (1)
29Features.Get<IConnectionLifetimeFeature>()?.Abort();
Microsoft.AspNetCore.Http.Connections (1)
HttpConnectionContextExtensions.cs (1)
25return connection.Features.Get<IHttpContextFeature>()?.HttpContext;
Microsoft.AspNetCore.Http.Connections.Common (1)
NegotiationResponse.cs (1)
52/// It should also set <see cref="IStatefulReconnectFeature"/> on the <see cref="BaseConnectionContext.Features"/> collection so other layers of the
Microsoft.AspNetCore.Http.Connections.Tests (9)
HttpConnectionDispatcherTests.cs (9)
1817var transferFormatFeature = connection.Features.Get<ITransferFormatFeature>(); 2002Assert.True(connection.Features.Get<IConnectionInherentKeepAliveFeature>().HasInherentKeepAlive); 2307Assert.Null(connection.Features.Get<IStatefulReconnectFeature>()); 2336Assert.Null(connection.Features.Get<IStatefulReconnectFeature>()); 2365Assert.NotNull(connection.Features.Get<IStatefulReconnectFeature>()); 2395var reconnectFeature = connection.Features.Get<IStatefulReconnectFeature>(); 2469var reconnectFeature = connection.Features.Get<IStatefulReconnectFeature>(); 3556var feature = Assert.IsType<HttpRequestTimeoutFeature>(context.Features.Get<IHttpContextFeature>()?.HttpContext.Features.Get<IHttpRequestTimeoutFeature>()); 4000var reconnectFeature = connection.Features.Get<IStatefulReconnectFeature>();
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
src\Shared\Http2cat\Http2CatHostedService.cs (1)
86var memoryPool = context.Features.Get<IMemoryPoolFeature>()?.MemoryPool;
Microsoft.AspNetCore.Server.Kestrel.Core (37)
HttpsConfigurationService.cs (1)
205public override IFeatureCollection Features => _inner.Features;
Internal\Http3\Http3Connection.cs (5)
374var streamDirectionFeature = streamContext.Features.Get<IStreamDirectionFeature>(); 375var streamIdFeature = streamContext.Features.Get<IStreamIdFeature>(); 568streamContext.Features.GetRequiredFeature<IProtocolErrorCodeFeature>().Error = (long)Http3ErrorCode.RequestRejected; 578var persistentStateFeature = streamContext.Features.Get<IPersistentStateFeature>(); 647streamContext.Features,
Internal\Http3\Http3ControlStream.cs (1)
391_context.ConnectionContext.Features.Get<IConnectionLifetimeNotificationFeature>()?.RequestClose();
Internal\HttpConnection.cs (1)
119if (_context.ConnectionContext.Features.Get<IConnectionMetricsTagsFeature>() is { } metricsTags)
Internal\Infrastructure\KestrelConnectionOfT.cs (5)
27connectionContext.Features.Set<IConnectionHeartbeatFeature>(this); 28connectionContext.Features.Set<IConnectionCompleteFeature>(this); 29connectionContext.Features.Set<IConnectionLifetimeNotificationFeature>(this); 30connectionContext.Features.Set<IConnectionMetricsContextFeature>(this); 51connectionContext.Features.Set<IConnectionMetricsTagsFeature>(metricsTagsFeature);
Internal\SniOptionsSelector.cs (1)
148connection.Features.Set(new HttpProtocolsFeature(sniOptions.HttpProtocols));
Internal\TlsConnectionFeature.cs (1)
108_context.Features.Get<IConnectionLifetimeNotificationFeature>()?.RequestClose();
Middleware\ConnectionLimitMiddleware.cs (2)
38_metrics.ConnectionRejected(connection.Features.GetRequiredFeature<IConnectionMetricsContextFeature>().MetricsContext); 47connection.Features.Set<IDecrementConcurrentConnectionCountFeature>(releasor);
Middleware\HttpConnectionMiddleware.cs (4)
30var memoryPoolFeature = connectionContext.Features.Get<IMemoryPoolFeature>(); 31var protocols = connectionContext.Features.Get<HttpProtocolsFeature>()?.HttpProtocols ?? _endpointDefaultProtocols; 32var metricContext = connectionContext.Features.GetRequiredFeature<IConnectionMetricsContextFeature>().MetricsContext; 42connectionContext.Features,
Middleware\HttpMultiplexedConnectionMiddleware.cs (3)
29var memoryPoolFeature = connectionContext.Features.Get<IMemoryPoolFeature>(); 39connectionContext.Features, 44if (connectionContext.Features.Get<IConnectionMetricsTagsFeature>() is { } metricsTags)
Middleware\HttpsConnectionMiddleware.cs (11)
136if (context.Features.Get<ITlsConnectionFeature>() != null) 144context.Features.Get<IMemoryPoolFeature>()?.MemoryPool ?? MemoryPool<byte>.Shared); 151context.Features.Set<ITlsConnectionFeature>(feature); 152context.Features.Set<ITlsHandshakeFeature>(feature); 153context.Features.Set<ITlsApplicationProtocolFeature>(feature); 154context.Features.Set<ISslStreamFeature>(feature); 155context.Features.Set<SslStream>(sslStream); // Anti-pattern, but retain for back compat 157var metricsContext = context.Features.GetRequiredFeature<IConnectionMetricsContextFeature>().MetricsContext; 205if (context.Features.Get<IConnectionMetricsTagsFeature>() is { } metricsTags) 349_metrics.TlsHandshakeStart(context.Features.GetRequiredFeature<IConnectionMetricsContextFeature>().MetricsContext); 441context.Features.Set(sslStream);
Middleware\LoggingMultiplexedConnectionMiddleware.cs (2)
44public override IFeatureCollection Features => _inner.Features; 121public override IFeatureCollection Features => _inner.Features;
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (1)
QuicTestHelpers.cs (1)
103connection?.Features.Set<IConnectionHeartbeatFeature>(new TestConnectionHeartbeatFeature());
Microsoft.AspNetCore.SignalR.Client.Core (6)
HubConnection.cs (6)
485var statefulReconnectFeature = connection.Features.Get<IStatefulReconnectFeature>(); 530if (!(connection.Features.Get<IConnectionInherentKeepAliveFeature>()?.HasInherentKeepAlive ?? false)) 607if (connectionState.Connection.Features.Get<IStatefulReconnectFeature>() is IStatefulReconnectFeature feature) 1164if (connectionState.Connection.Features.Get<IStatefulReconnectFeature>() is IStatefulReconnectFeature feature) 1979_hasInherentKeepAlive = connection.Features.Get<IConnectionInherentKeepAliveFeature>()?.HasInherentKeepAlive ?? false; 1982if (Connection.Features.Get<IStatefulReconnectFeature>() is IStatefulReconnectFeature feature)
Microsoft.AspNetCore.SignalR.Client.Tests (1)
HubConnectionTests.Reconnect.cs (1)
1177public override IFeatureCollection Features => _inner.Features;
Microsoft.AspNetCore.SignalR.Core (4)
HubConnectionContext.cs (4)
84if (connectionContext.Features.Get<IConnectionLifetimeNotificationFeature>() is IConnectionLifetimeNotificationFeature lifetimeNotification) 148public virtual IFeatureCollection Features => _connectionContext.Features; 463if (_useStatefulReconnect && _connectionContext.Features.Get<IStatefulReconnectFeature>() is IStatefulReconnectFeature feature) 588if (_connectionContext.Features.Get<IStatefulReconnectFeature>() is IStatefulReconnectFeature feature)
Microsoft.AspNetCore.SignalR.Tests (1)
HttpHeaderConnectionHandler.cs (1)
23var headers = connection.Features.Get<IHttpContextFeature>().HttpContext.Request.Headers;
SignalRSamples (1)
ConnectionHandlers\MessagesConnectionHandler.cs (1)
19var transportType = connection.Features.Get<IHttpTransportFeature>()?.TransportType;
SocialWeather (1)
PersistentConnectionLifeTimeManager.cs (1)
27var transferFormatFeature = connection.Features.Get<ITransferFormatFeature>();
Sockets.FunctionalTests (1)
src\Servers\Kestrel\test\FunctionalTests\UnixDomainSocketsTests.cs (1)
49var notificationFeature = connection.Features.Get<IConnectionLifetimeNotificationFeature>();
WebTransportInteractiveSampleApp (1)
Program.cs (1)
77direction = stream.Features.GetRequiredFeature<IStreamDirectionFeature>();