5 implementations of IHttpConnectionFeature
Microsoft.AspNetCore.Http (1)
Features\HttpConnectionFeature.cs (1)
11public class HttpConnectionFeature : IHttpConnectionFeature
Microsoft.AspNetCore.Owin (1)
OwinFeatureCollection.cs (1)
28IHttpConnectionFeature,
Microsoft.AspNetCore.Server.HttpSys (1)
RequestProcessing\RequestContext.FeatureCollection.cs (1)
22IHttpConnectionFeature,
Microsoft.AspNetCore.Server.IIS (1)
Core\IISHttpContext.IHttpConnectionFeature.cs (1)
11internal partial class IISHttpContext : IHttpConnectionFeature
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\Http\HttpProtocol.Generated.cs (1)
32IHttpConnectionFeature,
74 references to IHttpConnectionFeature
IIS.Tests (2)
ConnectionIdFeatureTests.cs (2)
22var connectionIdFeature = ctx.Features.Get<IHttpConnectionFeature>();
InMemory.FunctionalTests (4)
EventSourceTests.cs (2)
43connectionId = context.Features.Get<IHttpConnectionFeature>().ConnectionId; 151connectionId = context.Features.Get<IHttpConnectionFeature>().ConnectionId;
KestrelMetricsTests.cs (2)
686connectionId = context.Features.Get<IHttpConnectionFeature>().ConnectionId; 854connectionId = context.Features.Get<IHttpConnectionFeature>().ConnectionId;
Microsoft.AspNetCore.Http (4)
Features\HttpConnectionFeature.cs (1)
9/// Default implementation for <see cref="IHttpConnectionFeature"/>.
Internal\DefaultConnectionInfo.cs (3)
14private static readonly Func<IFeatureCollection, IHttpConnectionFeature> _newHttpConnectionFeature = f => new HttpConnectionFeature(); 40private IHttpConnectionFeature HttpConnectionFeature => 98public IHttpConnectionFeature? Connection;
Microsoft.AspNetCore.Http.Connections (4)
Internal\HttpConnectionDispatcher.cs (4)
603connection.Features.Set(context.Features.Get<IHttpConnectionFeature>()); 733var existingConnectionFeature = context.Features.Get<IHttpConnectionFeature>(); 752features.Set<IHttpConnectionFeature>(connectionFeature);
Microsoft.AspNetCore.Owin (11)
OwinEnvironment.cs (5)
77{ OwinConstants.CommonKeys.ConnectionId, new FeatureMap<IHttpConnectionFeature>(feature => feature.ConnectionId, 80{ OwinConstants.CommonKeys.LocalPort, new FeatureMap<IHttpConnectionFeature>(feature => feature.LocalPort.ToString(CultureInfo.InvariantCulture), 82{ OwinConstants.CommonKeys.RemotePort, new FeatureMap<IHttpConnectionFeature>(feature => feature.RemotePort.ToString(CultureInfo.InvariantCulture), 85{ OwinConstants.CommonKeys.LocalIpAddress, new FeatureMap<IHttpConnectionFeature>(feature => feature.LocalIpAddress.ToString(), 87{ OwinConstants.CommonKeys.RemoteIpAddress, new FeatureMap<IHttpConnectionFeature>(feature => feature.RemoteIpAddress.ToString(),
OwinFeatureCollection.cs (6)
199IPAddress IHttpConnectionFeature.RemoteIpAddress 205IPAddress IHttpConnectionFeature.LocalIpAddress 211int IHttpConnectionFeature.RemotePort 217int IHttpConnectionFeature.LocalPort 223string IHttpConnectionFeature.ConnectionId 403yield return new KeyValuePair<Type, object>(typeof(IHttpConnectionFeature), this);
Microsoft.AspNetCore.Server.HttpSys (6)
RequestProcessing\RequestContext.FeatureCollection.cs (5)
236IPAddress? IHttpConnectionFeature.LocalIpAddress 254IPAddress? IHttpConnectionFeature.RemoteIpAddress 272int IHttpConnectionFeature.LocalPort 290int IHttpConnectionFeature.RemotePort 308string IHttpConnectionFeature.ConnectionId
StandardFeatureCollection.cs (1)
18{ typeof(IHttpConnectionFeature), _identityFunc },
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (8)
RequestTests.cs (8)
42var connectionInfo = httpContext.Features.Get<IHttpConnectionFeature>(); 100var connectionInfo = httpContext.Features.Get<IHttpConnectionFeature>(); 163var connectionInfo = httpContext.Features.Get<IHttpConnectionFeature>(); 213var connectionInfo = httpContext.Features.Get<IHttpConnectionFeature>();
Microsoft.AspNetCore.Server.IIS (12)
Core\IISHttpContext.cs (4)
744Log.ApplicationError(_logger, ((IHttpConnectionFeature)this).ConnectionId, ((IHttpRequestIdentifierFeature)this).TraceIdentifier, ex); 752Log.ConnectionBadRequest(_logger, ((IHttpConnectionFeature)this).ConnectionId, ex); 782Log.ApplicationError(_logger, ((IHttpConnectionFeature)this).ConnectionId, ((IHttpRequestIdentifierFeature)this).TraceIdentifier, ex); 787Log.RequestAborted(_logger, ((IHttpConnectionFeature)this).ConnectionId, ((IHttpRequestIdentifierFeature)this).TraceIdentifier);
Core\IISHttpContext.Features.cs (1)
15private static readonly Type IHttpConnectionFeatureType = typeof(global::Microsoft.AspNetCore.Http.Features.IHttpConnectionFeature);
Core\IISHttpContext.IHttpConnectionFeature.cs (5)
13IPAddress? IHttpConnectionFeature.RemoteIpAddress 27IPAddress? IHttpConnectionFeature.LocalIpAddress 40int IHttpConnectionFeature.RemotePort 54int IHttpConnectionFeature.LocalPort 68string IHttpConnectionFeature.ConnectionId
Core\IISHttpContext.IO.cs (2)
248Log.ConnectionDisconnect(_logger, ((IHttpConnectionFeature)this).ConnectionId); 283Log.ApplicationError(_logger, ((IHttpConnectionFeature)this).ConnectionId, TraceIdentifier!, ex); // TODO: Can TraceIdentifier be null?
Microsoft.AspNetCore.Server.Kestrel.Core (14)
Internal\Http\HttpProtocol.FeatureCollection.cs (5)
156IPAddress? IHttpConnectionFeature.RemoteIpAddress 162IPAddress? IHttpConnectionFeature.LocalIpAddress 168int IHttpConnectionFeature.RemotePort 174int IHttpConnectionFeature.LocalPort 180string IHttpConnectionFeature.ConnectionId
Internal\Http\HttpProtocol.Generated.cs (9)
51internal protected IHttpConnectionFeature? _currentIHttpConnectionFeature; 248else if (key == typeof(IHttpConnectionFeature)) 400else if (key == typeof(IHttpConnectionFeature)) 402_currentIHttpConnectionFeature = (IHttpConnectionFeature?)value; 554else if (typeof(TFeature) == typeof(IHttpConnectionFeature)) 556feature = Unsafe.As<IHttpConnectionFeature?, TFeature?>(ref _currentIHttpConnectionFeature); 714else if (typeof(TFeature) == typeof(IHttpConnectionFeature)) 716_currentIHttpConnectionFeature = Unsafe.As<TFeature?, IHttpConnectionFeature?>(ref feature); 864yield return new KeyValuePair<Type, object>(typeof(IHttpConnectionFeature), _currentIHttpConnectionFeature);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (4)
Http1\Http1HttpProtocolFeatureCollectionTests.cs (4)
112_collection[typeof(IHttpConnectionFeature)] = CreateHttp1Connection(); 142_collection.Set<IHttpConnectionFeature>(CreateHttp1Connection()); 189Assert.Same(_collection.Get<IHttpConnectionFeature>(), _collection[typeof(IHttpConnectionFeature)]);
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (2)
HttpProtocolFeatureCollection.cs (2)
110public IHttpConnectionFeature Get_IHttpConnectionFeature() 112return _collection.Get<IHttpConnectionFeature>();
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (2)
Hubs.cs (2)
83var feature = Context.Features.Get<IHttpConnectionFeature>();
Microsoft.AspNetCore.TestHost.Tests (1)
ClientHandlerTests.cs (1)
267Assert.Equal(IPAddress.Parse("1.1.1.1"), features.Get<IHttpConnectionFeature>().RemoteIpAddress);