5 implementations of IPersistentStateFeature
InMemory.FunctionalTests (1)
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (1)
1091internal class TestStreamContext : ConnectionContext, IStreamDirectionFeature, IStreamIdFeature, IProtocolErrorCodeFeature, IPersistentStateFeature, IStreamAbortFeature, IDisposable, IStreamClosedFeature
Microsoft.AspNetCore.Server.Kestrel.Core (2)
Internal\Http\Http1Connection.FeatureCollection.cs (1)
12IPersistentStateFeature
Internal\Http2\Http2Stream.FeatureCollection.cs (1)
17IPersistentStateFeature
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (1)
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (1)
1091internal class TestStreamContext : ConnectionContext, IStreamDirectionFeature, IStreamIdFeature, IProtocolErrorCodeFeature, IPersistentStateFeature, IStreamAbortFeature, IDisposable, IStreamClosedFeature
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
Internal\QuicStreamContext.FeatureCollection.cs (1)
11IPersistentStateFeature,
73 references to IPersistentStateFeature
InMemory.FunctionalTests (15)
Http2\Http2ConnectionTests.cs (1)
504var persistentStateCollection = context.Features.Get<IPersistentStateFeature>().State;
Http3\Http3ConnectionTests.cs (2)
472var http3Stream1 = (Http3Stream)streamContext1.Features.Get<IPersistentStateFeature>().State[Http3Connection.StreamPersistentStateKey]; 479var http3Stream2 = (Http3Stream)streamContext2.Features.Get<IPersistentStateFeature>().State[Http3Connection.StreamPersistentStateKey];
RequestTests.cs (1)
2140var persistentStateCollection = context.Features.Get<IPersistentStateFeature>().State;
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (2)
1159Features.Set<IPersistentStateFeature>(this); 1262IDictionary<object, object> IPersistentStateFeature.State
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (9)
31internal protected IPersistentStateFeature? _currentIPersistentStateFeature; 143else if (key == typeof(IPersistentStateFeature)) 207else if (key == typeof(IPersistentStateFeature)) 209_currentIPersistentStateFeature = (IPersistentStateFeature?)value; 273else if (typeof(TFeature) == typeof(IPersistentStateFeature)) 275feature = Unsafe.As<IPersistentStateFeature?, TFeature?>(ref _currentIPersistentStateFeature); 345else if (typeof(TFeature) == typeof(IPersistentStateFeature)) 347_currentIPersistentStateFeature = Unsafe.As<TFeature?, IPersistentStateFeature?>(ref feature); 407yield return new KeyValuePair<Type, object>(typeof(IPersistentStateFeature), _currentIPersistentStateFeature);
Interop.FunctionalTests (1)
Http3\Http3RequestTests.cs (1)
835var persistentStateCollection = context.Features.Get<IPersistentStateFeature>().State;
Microsoft.AspNetCore.Server.Kestrel.Core (14)
Internal\Http\Http1Connection.FeatureCollection.cs (1)
31IDictionary<object, object?> IPersistentStateFeature.State
Internal\Http\HttpProtocol.Generated.cs (9)
77internal protected IPersistentStateFeature? _currentIPersistentStateFeature; 328else if (key == typeof(IPersistentStateFeature)) 480else if (key == typeof(IPersistentStateFeature)) 482_currentIPersistentStateFeature = (IPersistentStateFeature?)value; 634else if (typeof(TFeature) == typeof(IPersistentStateFeature)) 636feature = Unsafe.As<IPersistentStateFeature?, TFeature?>(ref _currentIPersistentStateFeature); 794else if (typeof(TFeature) == typeof(IPersistentStateFeature)) 796_currentIPersistentStateFeature = Unsafe.As<TFeature?, IPersistentStateFeature?>(ref feature); 944yield return new KeyValuePair<Type, object>(typeof(IPersistentStateFeature), _currentIPersistentStateFeature);
Internal\Http2\Http2Stream.FeatureCollection.cs (1)
68IDictionary<object, object?> IPersistentStateFeature.State
Internal\Http3\Http3Connection.cs (3)
598var persistentStateFeature = streamContext.Features.Get<IPersistentStateFeature>(); 599Debug.Assert(persistentStateFeature != null, $"Required {nameof(IPersistentStateFeature)} not on stream context.");
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
Http1\Http1HttpProtocolFeatureCollectionTests.cs (2)
121_collection[typeof(IPersistentStateFeature)] = CreateHttp1Connection(); 151_collection.Set<IPersistentStateFeature>(CreateHttp1Connection());
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (11)
src\Servers\Kestrel\shared\test\Http3\Http3InMemory.cs (2)
1159Features.Set<IPersistentStateFeature>(this); 1262IDictionary<object, object> IPersistentStateFeature.State
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (9)
31internal protected IPersistentStateFeature? _currentIPersistentStateFeature; 143else if (key == typeof(IPersistentStateFeature)) 207else if (key == typeof(IPersistentStateFeature)) 209_currentIPersistentStateFeature = (IPersistentStateFeature?)value; 273else if (typeof(TFeature) == typeof(IPersistentStateFeature)) 275feature = Unsafe.As<IPersistentStateFeature?, TFeature?>(ref _currentIPersistentStateFeature); 345else if (typeof(TFeature) == typeof(IPersistentStateFeature)) 347_currentIPersistentStateFeature = Unsafe.As<TFeature?, IPersistentStateFeature?>(ref feature); 407yield return new KeyValuePair<Type, object>(typeof(IPersistentStateFeature), _currentIPersistentStateFeature);
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (9)
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (9)
31internal protected IPersistentStateFeature? _currentIPersistentStateFeature; 143else if (key == typeof(IPersistentStateFeature)) 207else if (key == typeof(IPersistentStateFeature)) 209_currentIPersistentStateFeature = (IPersistentStateFeature?)value; 273else if (typeof(TFeature) == typeof(IPersistentStateFeature)) 275feature = Unsafe.As<IPersistentStateFeature?, TFeature?>(ref _currentIPersistentStateFeature); 345else if (typeof(TFeature) == typeof(IPersistentStateFeature)) 347_currentIPersistentStateFeature = Unsafe.As<TFeature?, IPersistentStateFeature?>(ref feature); 407yield return new KeyValuePair<Type, object>(typeof(IPersistentStateFeature), _currentIPersistentStateFeature);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (10)
Internal\QuicStreamContext.FeatureCollection.cs (1)
50IDictionary<object, object?> IPersistentStateFeature.State
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (9)
31internal protected IPersistentStateFeature? _currentIPersistentStateFeature; 143else if (key == typeof(IPersistentStateFeature)) 207else if (key == typeof(IPersistentStateFeature)) 209_currentIPersistentStateFeature = (IPersistentStateFeature?)value; 273else if (typeof(TFeature) == typeof(IPersistentStateFeature)) 275feature = Unsafe.As<IPersistentStateFeature?, TFeature?>(ref _currentIPersistentStateFeature); 345else if (typeof(TFeature) == typeof(IPersistentStateFeature)) 347_currentIPersistentStateFeature = Unsafe.As<TFeature?, IPersistentStateFeature?>(ref feature); 407yield return new KeyValuePair<Type, object>(typeof(IPersistentStateFeature), _currentIPersistentStateFeature);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (2)
QuicConnectionContextTests.cs (2)
687serverStream1.Features.Get<IPersistentStateFeature>().State["test"] = true; 715object state = serverStream2.Features.Get<IPersistentStateFeature>().State["test"];
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (9)
src\Servers\Kestrel\shared\TransportConnection.Generated.cs (9)
31internal protected IPersistentStateFeature? _currentIPersistentStateFeature; 143else if (key == typeof(IPersistentStateFeature)) 207else if (key == typeof(IPersistentStateFeature)) 209_currentIPersistentStateFeature = (IPersistentStateFeature?)value; 273else if (typeof(TFeature) == typeof(IPersistentStateFeature)) 275feature = Unsafe.As<IPersistentStateFeature?, TFeature?>(ref _currentIPersistentStateFeature); 345else if (typeof(TFeature) == typeof(IPersistentStateFeature)) 347_currentIPersistentStateFeature = Unsafe.As<TFeature?, IPersistentStateFeature?>(ref feature); 407yield return new KeyValuePair<Type, object>(typeof(IPersistentStateFeature), _currentIPersistentStateFeature);