10 implementations of IConnectionLifetimeFeature
InMemory.FunctionalTests (2)
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (1)
1019internal class TestMultiplexedConnectionContext : MultiplexedConnectionContext, IConnectionLifetimeNotificationFeature, IConnectionLifetimeFeature, IConnectionHeartbeatFeature, IProtocolErrorCodeFeature, IConnectionMetricsContextFeature, IConnectionMetricsTagsFeature
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (1)
21IConnectionLifetimeFeature,
Microsoft.AspNetCore.Connections.Abstractions (1)
DefaultConnectionContext.cs (1)
24IConnectionLifetimeFeature,
Microsoft.AspNetCore.Http.Connections (1)
Internal\HttpConnectionContext.cs (1)
32IConnectionLifetimeFeature,
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (2)
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (1)
1019internal class TestMultiplexedConnectionContext : MultiplexedConnectionContext, IConnectionLifetimeNotificationFeature, IConnectionLifetimeFeature, IConnectionHeartbeatFeature, IProtocolErrorCodeFeature, IConnectionMetricsContextFeature, IConnectionMetricsTagsFeature
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (1)
21IConnectionLifetimeFeature,
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (1)
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (1)
21IConnectionLifetimeFeature,
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (2)
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (1)
21IConnectionLifetimeFeature,
src\Servers\Kestrel\shared\TransportMultiplexedConnection.Generated.cs (1)
20IConnectionLifetimeFeature,
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (1)
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (1)
21IConnectionLifetimeFeature,
79 references to IConnectionLifetimeFeature
InMemory.FunctionalTests (13)
ResponseTests.cs (2)
3042var feature = httpContext.Features.Get<IConnectionLifetimeFeature>();
src\Servers\Kestrel\shared\TransportConnection.FeatureCollection.cs (2)
34CancellationToken IConnectionLifetimeFeature.ConnectionClosed 40void IConnectionLifetimeFeature.Abort() => Abort(new ConnectionAbortedException("The connection was aborted by the application via IConnectionLifetimeFeature.Abort()."));
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (9)
29internal protected IConnectionLifetimeFeature? _currentIConnectionLifetimeFeature; 154else if (key == typeof(IConnectionLifetimeFeature)) 222else if (key == typeof(IConnectionLifetimeFeature)) 224_currentIConnectionLifetimeFeature = (IConnectionLifetimeFeature?)value; 292else if (typeof(TFeature) == typeof(IConnectionLifetimeFeature)) 294feature = Unsafe.As<IConnectionLifetimeFeature?, TFeature?>(ref _currentIConnectionLifetimeFeature); 368else if (typeof(TFeature) == typeof(IConnectionLifetimeFeature)) 370_currentIConnectionLifetimeFeature = Unsafe.As<TFeature?, IConnectionLifetimeFeature?>(ref feature); 434yield return new KeyValuePair<Type, object>(typeof(IConnectionLifetimeFeature), _currentIConnectionLifetimeFeature);
Microsoft.AspNetCore.Connections.Abstractions (2)
ConnectionContext.cs (1)
29Features.Get<IConnectionLifetimeFeature>()?.Abort();
DefaultConnectionContext.cs (1)
52Features.Set<IConnectionLifetimeFeature>(this);
Microsoft.AspNetCore.Http.Connections (1)
Internal\HttpConnectionContext.cs (1)
98Features.Set<IConnectionLifetimeFeature>(this);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
Http1\Http1ConnectionTestsBase.cs (1)
45connectionFeatures.Set(Mock.Of<IConnectionLifetimeFeature>());
TestHelpers\TestInput.cs (1)
37connectionFeatures.Set(Mock.Of<IConnectionLifetimeFeature>());
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (11)
src\Servers\Kestrel\shared\TransportConnection.FeatureCollection.cs (2)
34CancellationToken IConnectionLifetimeFeature.ConnectionClosed 40void IConnectionLifetimeFeature.Abort() => Abort(new ConnectionAbortedException("The connection was aborted by the application via IConnectionLifetimeFeature.Abort()."));
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (9)
29internal protected IConnectionLifetimeFeature? _currentIConnectionLifetimeFeature; 154else if (key == typeof(IConnectionLifetimeFeature)) 222else if (key == typeof(IConnectionLifetimeFeature)) 224_currentIConnectionLifetimeFeature = (IConnectionLifetimeFeature?)value; 292else if (typeof(TFeature) == typeof(IConnectionLifetimeFeature)) 294feature = Unsafe.As<IConnectionLifetimeFeature?, TFeature?>(ref _currentIConnectionLifetimeFeature); 368else if (typeof(TFeature) == typeof(IConnectionLifetimeFeature)) 370_currentIConnectionLifetimeFeature = Unsafe.As<TFeature?, IConnectionLifetimeFeature?>(ref feature); 434yield return new KeyValuePair<Type, object>(typeof(IConnectionLifetimeFeature), _currentIConnectionLifetimeFeature);
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (11)
src\Servers\Kestrel\shared\TransportConnection.FeatureCollection.cs (2)
34CancellationToken IConnectionLifetimeFeature.ConnectionClosed 40void IConnectionLifetimeFeature.Abort() => Abort(new ConnectionAbortedException("The connection was aborted by the application via IConnectionLifetimeFeature.Abort()."));
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (9)
29internal protected IConnectionLifetimeFeature? _currentIConnectionLifetimeFeature; 154else if (key == typeof(IConnectionLifetimeFeature)) 222else if (key == typeof(IConnectionLifetimeFeature)) 224_currentIConnectionLifetimeFeature = (IConnectionLifetimeFeature?)value; 292else if (typeof(TFeature) == typeof(IConnectionLifetimeFeature)) 294feature = Unsafe.As<IConnectionLifetimeFeature?, TFeature?>(ref _currentIConnectionLifetimeFeature); 368else if (typeof(TFeature) == typeof(IConnectionLifetimeFeature)) 370_currentIConnectionLifetimeFeature = Unsafe.As<TFeature?, IConnectionLifetimeFeature?>(ref feature); 434yield return new KeyValuePair<Type, object>(typeof(IConnectionLifetimeFeature), _currentIConnectionLifetimeFeature);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (22)
src\Servers\Kestrel\shared\TransportConnection.FeatureCollection.cs (2)
34CancellationToken IConnectionLifetimeFeature.ConnectionClosed 40void IConnectionLifetimeFeature.Abort() => Abort(new ConnectionAbortedException("The connection was aborted by the application via IConnectionLifetimeFeature.Abort()."));
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (9)
29internal protected IConnectionLifetimeFeature? _currentIConnectionLifetimeFeature; 154else if (key == typeof(IConnectionLifetimeFeature)) 222else if (key == typeof(IConnectionLifetimeFeature)) 224_currentIConnectionLifetimeFeature = (IConnectionLifetimeFeature?)value; 292else if (typeof(TFeature) == typeof(IConnectionLifetimeFeature)) 294feature = Unsafe.As<IConnectionLifetimeFeature?, TFeature?>(ref _currentIConnectionLifetimeFeature); 368else if (typeof(TFeature) == typeof(IConnectionLifetimeFeature)) 370_currentIConnectionLifetimeFeature = Unsafe.As<TFeature?, IConnectionLifetimeFeature?>(ref feature); 434yield return new KeyValuePair<Type, object>(typeof(IConnectionLifetimeFeature), _currentIConnectionLifetimeFeature);
src\Servers\Kestrel\shared\TransportMultiplexedConnection.FeatureCollection.cs (2)
25CancellationToken IConnectionLifetimeFeature.ConnectionClosed 31void IConnectionLifetimeFeature.Abort() => Abort(new ConnectionAbortedException("The connection was aborted by the application via IConnectionLifetimeFeature.Abort()."));
src\Servers\Kestrel\shared\TransportMultiplexedConnection.Generated.cs (9)
27internal protected IConnectionLifetimeFeature? _currentIConnectionLifetimeFeature; 137else if (key == typeof(IConnectionLifetimeFeature)) 181else if (key == typeof(IConnectionLifetimeFeature)) 183_currentIConnectionLifetimeFeature = (IConnectionLifetimeFeature?)value; 227else if (typeof(TFeature) == typeof(IConnectionLifetimeFeature)) 229feature = Unsafe.As<IConnectionLifetimeFeature?, TFeature?>(ref _currentIConnectionLifetimeFeature); 274else if (typeof(TFeature) == typeof(IConnectionLifetimeFeature)) 276_currentIConnectionLifetimeFeature = Unsafe.As<TFeature?, IConnectionLifetimeFeature?>(ref feature); 316yield return new KeyValuePair<Type, object>(typeof(IConnectionLifetimeFeature), _currentIConnectionLifetimeFeature);
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (11)
src\Servers\Kestrel\shared\TransportConnection.FeatureCollection.cs (2)
34CancellationToken IConnectionLifetimeFeature.ConnectionClosed 40void IConnectionLifetimeFeature.Abort() => Abort(new ConnectionAbortedException("The connection was aborted by the application via IConnectionLifetimeFeature.Abort()."));
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (9)
29internal protected IConnectionLifetimeFeature? _currentIConnectionLifetimeFeature; 154else if (key == typeof(IConnectionLifetimeFeature)) 222else if (key == typeof(IConnectionLifetimeFeature)) 224_currentIConnectionLifetimeFeature = (IConnectionLifetimeFeature?)value; 292else if (typeof(TFeature) == typeof(IConnectionLifetimeFeature)) 294feature = Unsafe.As<IConnectionLifetimeFeature?, TFeature?>(ref _currentIConnectionLifetimeFeature); 368else if (typeof(TFeature) == typeof(IConnectionLifetimeFeature)) 370_currentIConnectionLifetimeFeature = Unsafe.As<TFeature?, IConnectionLifetimeFeature?>(ref feature); 434yield return new KeyValuePair<Type, object>(typeof(IConnectionLifetimeFeature), _currentIConnectionLifetimeFeature);
Sockets.FunctionalTests (6)
src\Servers\Kestrel\test\FunctionalTests\RequestTests.cs (6)
804var connectionLifetimeFeature = context.Features.Get<IConnectionLifetimeFeature>(); 836var connectionLifetimeFeature = context.Features.Get<IConnectionLifetimeFeature>(); 872var connectionLifetimeFeature = context.Features.Get<IConnectionLifetimeFeature>();