10 implementations of IConnectionLifetimeFeature
InMemory.FunctionalTests (2)
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (1)
984internal class TestMultiplexedConnectionContext : MultiplexedConnectionContext, IConnectionLifetimeNotificationFeature, IConnectionLifetimeFeature, IConnectionHeartbeatFeature, IProtocolErrorCodeFeature, IConnectionMetricsContextFeature
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)
984internal class TestMultiplexedConnectionContext : MultiplexedConnectionContext, IConnectionLifetimeNotificationFeature, IConnectionLifetimeFeature, IConnectionHeartbeatFeature, IProtocolErrorCodeFeature, IConnectionMetricsContextFeature
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)
2814var feature = httpContext.Features.Get<IConnectionLifetimeFeature>();
src\Servers\Kestrel\shared\TransportConnection.FeatureCollection.cs (2)
33CancellationToken IConnectionLifetimeFeature.ConnectionClosed 39void IConnectionLifetimeFeature.Abort() => Abort(new ConnectionAbortedException("The connection was aborted by the application via IConnectionLifetimeFeature.Abort()."));
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (9)
28internal protected IConnectionLifetimeFeature? _currentIConnectionLifetimeFeature; 151else if (key == typeof(IConnectionLifetimeFeature)) 215else if (key == typeof(IConnectionLifetimeFeature)) 217_currentIConnectionLifetimeFeature = (IConnectionLifetimeFeature?)value; 281else if (typeof(TFeature) == typeof(IConnectionLifetimeFeature)) 283feature = Unsafe.As<IConnectionLifetimeFeature?, TFeature?>(ref _currentIConnectionLifetimeFeature); 353else if (typeof(TFeature) == typeof(IConnectionLifetimeFeature)) 355_currentIConnectionLifetimeFeature = Unsafe.As<TFeature?, IConnectionLifetimeFeature?>(ref feature); 415yield 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)
42connectionFeatures.Set(Mock.Of<IConnectionLifetimeFeature>());
TestHelpers\TestInput.cs (1)
34connectionFeatures.Set(Mock.Of<IConnectionLifetimeFeature>());
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (11)
src\Servers\Kestrel\shared\TransportConnection.FeatureCollection.cs (2)
33CancellationToken IConnectionLifetimeFeature.ConnectionClosed 39void IConnectionLifetimeFeature.Abort() => Abort(new ConnectionAbortedException("The connection was aborted by the application via IConnectionLifetimeFeature.Abort()."));
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (9)
28internal protected IConnectionLifetimeFeature? _currentIConnectionLifetimeFeature; 151else if (key == typeof(IConnectionLifetimeFeature)) 215else if (key == typeof(IConnectionLifetimeFeature)) 217_currentIConnectionLifetimeFeature = (IConnectionLifetimeFeature?)value; 281else if (typeof(TFeature) == typeof(IConnectionLifetimeFeature)) 283feature = Unsafe.As<IConnectionLifetimeFeature?, TFeature?>(ref _currentIConnectionLifetimeFeature); 353else if (typeof(TFeature) == typeof(IConnectionLifetimeFeature)) 355_currentIConnectionLifetimeFeature = Unsafe.As<TFeature?, IConnectionLifetimeFeature?>(ref feature); 415yield return new KeyValuePair<Type, object>(typeof(IConnectionLifetimeFeature), _currentIConnectionLifetimeFeature);
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (11)
src\Servers\Kestrel\shared\TransportConnection.FeatureCollection.cs (2)
33CancellationToken IConnectionLifetimeFeature.ConnectionClosed 39void IConnectionLifetimeFeature.Abort() => Abort(new ConnectionAbortedException("The connection was aborted by the application via IConnectionLifetimeFeature.Abort()."));
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (9)
28internal protected IConnectionLifetimeFeature? _currentIConnectionLifetimeFeature; 151else if (key == typeof(IConnectionLifetimeFeature)) 215else if (key == typeof(IConnectionLifetimeFeature)) 217_currentIConnectionLifetimeFeature = (IConnectionLifetimeFeature?)value; 281else if (typeof(TFeature) == typeof(IConnectionLifetimeFeature)) 283feature = Unsafe.As<IConnectionLifetimeFeature?, TFeature?>(ref _currentIConnectionLifetimeFeature); 353else if (typeof(TFeature) == typeof(IConnectionLifetimeFeature)) 355_currentIConnectionLifetimeFeature = Unsafe.As<TFeature?, IConnectionLifetimeFeature?>(ref feature); 415yield return new KeyValuePair<Type, object>(typeof(IConnectionLifetimeFeature), _currentIConnectionLifetimeFeature);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (22)
src\Servers\Kestrel\shared\TransportConnection.FeatureCollection.cs (2)
33CancellationToken IConnectionLifetimeFeature.ConnectionClosed 39void IConnectionLifetimeFeature.Abort() => Abort(new ConnectionAbortedException("The connection was aborted by the application via IConnectionLifetimeFeature.Abort()."));
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (9)
28internal protected IConnectionLifetimeFeature? _currentIConnectionLifetimeFeature; 151else if (key == typeof(IConnectionLifetimeFeature)) 215else if (key == typeof(IConnectionLifetimeFeature)) 217_currentIConnectionLifetimeFeature = (IConnectionLifetimeFeature?)value; 281else if (typeof(TFeature) == typeof(IConnectionLifetimeFeature)) 283feature = Unsafe.As<IConnectionLifetimeFeature?, TFeature?>(ref _currentIConnectionLifetimeFeature); 353else if (typeof(TFeature) == typeof(IConnectionLifetimeFeature)) 355_currentIConnectionLifetimeFeature = Unsafe.As<TFeature?, IConnectionLifetimeFeature?>(ref feature); 415yield return new KeyValuePair<Type, object>(typeof(IConnectionLifetimeFeature), _currentIConnectionLifetimeFeature);
src\Servers\Kestrel\shared\TransportMultiplexedConnection.FeatureCollection.cs (2)
24CancellationToken IConnectionLifetimeFeature.ConnectionClosed 30void IConnectionLifetimeFeature.Abort() => Abort(new ConnectionAbortedException("The connection was aborted by the application via IConnectionLifetimeFeature.Abort()."));
src\Servers\Kestrel\shared\TransportMultiplexedConnection.Generated.cs (9)
26internal protected IConnectionLifetimeFeature? _currentIConnectionLifetimeFeature; 134else if (key == typeof(IConnectionLifetimeFeature)) 174else if (key == typeof(IConnectionLifetimeFeature)) 176_currentIConnectionLifetimeFeature = (IConnectionLifetimeFeature?)value; 216else if (typeof(TFeature) == typeof(IConnectionLifetimeFeature)) 218feature = Unsafe.As<IConnectionLifetimeFeature?, TFeature?>(ref _currentIConnectionLifetimeFeature); 259else if (typeof(TFeature) == typeof(IConnectionLifetimeFeature)) 261_currentIConnectionLifetimeFeature = Unsafe.As<TFeature?, IConnectionLifetimeFeature?>(ref feature); 297yield return new KeyValuePair<Type, object>(typeof(IConnectionLifetimeFeature), _currentIConnectionLifetimeFeature);
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (11)
src\Servers\Kestrel\shared\TransportConnection.FeatureCollection.cs (2)
33CancellationToken IConnectionLifetimeFeature.ConnectionClosed 39void IConnectionLifetimeFeature.Abort() => Abort(new ConnectionAbortedException("The connection was aborted by the application via IConnectionLifetimeFeature.Abort()."));
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (9)
28internal protected IConnectionLifetimeFeature? _currentIConnectionLifetimeFeature; 151else if (key == typeof(IConnectionLifetimeFeature)) 215else if (key == typeof(IConnectionLifetimeFeature)) 217_currentIConnectionLifetimeFeature = (IConnectionLifetimeFeature?)value; 281else if (typeof(TFeature) == typeof(IConnectionLifetimeFeature)) 283feature = Unsafe.As<IConnectionLifetimeFeature?, TFeature?>(ref _currentIConnectionLifetimeFeature); 353else if (typeof(TFeature) == typeof(IConnectionLifetimeFeature)) 355_currentIConnectionLifetimeFeature = Unsafe.As<TFeature?, IConnectionLifetimeFeature?>(ref feature); 415yield return new KeyValuePair<Type, object>(typeof(IConnectionLifetimeFeature), _currentIConnectionLifetimeFeature);
Sockets.FunctionalTests (6)
src\Servers\Kestrel\test\FunctionalTests\RequestTests.cs (6)
728var connectionLifetimeFeature = context.Features.Get<IConnectionLifetimeFeature>(); 760var connectionLifetimeFeature = context.Features.Get<IConnectionLifetimeFeature>(); 796var connectionLifetimeFeature = context.Features.Get<IConnectionLifetimeFeature>();