15 implementations of Features
InProcessWebSite (1)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\DummyServer.cs (1)
28public IFeatureCollection Features { get; }
Microsoft.AspNetCore.DataProtection.Tests (1)
HostingTests.cs (1)
116public IFeatureCollection Features => new FeatureCollection();
Microsoft.AspNetCore.Hosting.Tests (4)
GenericWebHostBuilderTests.cs (1)
138public IFeatureCollection Features { get; } = new FeatureCollection();
WebHostBuilderTests.cs (2)
1454public IFeatureCollection Features { get; } = new FeatureCollection(); 1570IFeatureCollection IServer.Features { get; } = new FeatureCollection();
WebHostTests.cs (1)
1236public IFeatureCollection Features { get; }
Microsoft.AspNetCore.Hosting.TestSites (1)
Program.cs (1)
64public IFeatureCollection Features { get; } = new FeatureCollection();
Microsoft.AspNetCore.Hosting.WindowsServices.Tests (1)
WebHostServiceTests.cs (1)
49IFeatureCollection IServer.Features { get; }
Microsoft.AspNetCore.Server.HttpSys (1)
MessagePump.cs (1)
59public IFeatureCollection Features { get; }
Microsoft.AspNetCore.Server.IIS (1)
Core\IISHttpServer.cs (1)
38public IFeatureCollection Features { get; } = new FeatureCollection();
Microsoft.AspNetCore.Server.Kestrel.Core (2)
Internal\KestrelServerImpl.cs (1)
110public IFeatureCollection Features { get; }
KestrelServer.cs (1)
43public IFeatureCollection Features => _innerKestrelServer.Features;
Microsoft.AspNetCore.TestHost (1)
TestServer.cs (1)
129public IFeatureCollection Features { get; }
Microsoft.AspNetCore.Tests (2)
WebApplicationTests.cs (2)
331public IFeatureCollection Features { get; } = new FeatureCollection(); 3110public IFeatureCollection Features { get; } = new FeatureCollection();
41 references to Features
Aspire.Hosting (1)
Dashboard\DashboardServiceHost.cs (1)
203var addressFeature = _app.Services.GetService<IServer>()?.Features.Get<IServerAddressesFeature>();
InProcessWebSite (1)
src\Servers\IIS\IIS\test\testassets\InProcessWebSite\Startup.cs (1)
107var serverAddresses = ctx.RequestServices.GetService<IServer>().Features.Get<IServerAddressesFeature>();
Interop.FunctionalTests (1)
src\Servers\Kestrel\shared\test\TransportTestHelpers\IHostPortExtensions.cs (1)
30return host.Services.GetRequiredService<IServer>().Features.Get<IServerAddressesFeature>().Addresses
Microsoft.AspNetCore (1)
WebApplication.cs (1)
77internal IFeatureCollection ServerFeatures => _host.Services.GetRequiredService<IServer>().Features;
Microsoft.AspNetCore.DataProtection.Tests (1)
HostingTests.cs (1)
82mockServer.Setup(m => m.Features).Returns(new FeatureCollection());
Microsoft.AspNetCore.Hosting (5)
GenericHost\GenericWebHostService.cs (2)
66var serverAddressesFeature = Server.Features.Get<IServerAddressesFeature>(); 133var builder = ApplicationBuilderFactory.CreateBuilder(Server.Features);
Internal\WebHost.cs (3)
91return Server.Features; 210var builder = builderFactory.CreateBuilder(Server.Features); 261var serverAddressesFeature = Server.Features?.Get<IServerAddressesFeature>();
Microsoft.AspNetCore.Hosting.Tests (1)
Fakes\GenericWebHost.cs (1)
20public IFeatureCollection ServerFeatures => Services.GetRequiredService<IServer>().Features;
Microsoft.AspNetCore.Http.Connections.Tests (6)
HttpConnectionDispatcherTests.cs (5)
3252var url = host.Services.GetService<IServer>().Features.Get<IServerAddressesFeature>().Addresses.Single(); 3315var url = host.Services.GetService<IServer>().Features.Get<IServerAddressesFeature>().Addresses.Single(); 3414var url = host.Services.GetService<IServer>().Features.Get<IServerAddressesFeature>().Addresses.Single(); 3464var url = host.Services.GetService<IServer>().Features.Get<IServerAddressesFeature>().Addresses.Single(); 3538var url = host.Services.GetService<IServer>().Features.Get<IServerAddressesFeature>().Addresses.Single();
MapConnectionHandlerTests.cs (1)
396var feature = host.Services.GetService<IServer>().Features.Get<IServerAddressesFeature>();
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (7)
DelegateTests.cs (7)
58var delegationProperty = delegator.Features.Get<IServerDelegationFeature>(); 91var delegationProperty = delegator.Features.Get<IServerDelegationFeature>(); 124var delegationProperty = delegator.Features.Get<IServerDelegationFeature>(); 157var delegationProperty = delegator.Features.Get<IServerDelegationFeature>(); 178var delegationProperty = delegator.Features.Get<IServerDelegationFeature>(); 207var delegationProperty = delegator.Features.Get<IServerDelegationFeature>(); 240var delegationProperty = delegator.Features.Get<IServerDelegationFeature>();
Microsoft.AspNetCore.Server.HttpSys.NonHelixTests (1)
DelegateOutOfProcTests.cs (1)
60var delegationProperty = delegator.Features.Get<IServerDelegationFeature>();
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (1)
src\Servers\Kestrel\shared\test\TransportTestHelpers\IHostPortExtensions.cs (1)
30return host.Services.GetRequiredService<IServer>().Features.Get<IServerAddressesFeature>().Addresses
Microsoft.AspNetCore.SignalR.Tests.Utils (1)
src\Shared\SignalR\InProcessTestServer.cs (1)
129_url = _host.Services.GetService<IServer>().Features.Get<IServerAddressesFeature>().Addresses.Single();
Microsoft.AspNetCore.StaticFiles.FunctionalTests (1)
Helpers.cs (1)
15return server.Services.GetService<IServer>().Features.Get<IServerAddressesFeature>().Addresses.First();
Microsoft.AspNetCore.Testing (1)
ServiceFakesHostExtensions.cs (1)
70var feature = server.Features.Get<IServerAddressesFeature>();
Microsoft.AspNetCore.Testing.Tests (2)
FakesExtensionsTests.cs (2)
197hostMock.Object.Services.GetRequiredService<IServer>().Features[typeof(IServerAddressesFeature)] = null; 244mockServer.Setup(x => x.Features).Returns(features);
Microsoft.AspNetCore.WebSockets.Tests (1)
IHostPortExtensions.cs (1)
26return host.Services.GetService<IServer>().Features.Get<IServerAddressesFeature>().Addresses
NativeIISSample (2)
Startup.cs (2)
101var addresses = server.Features.Get<IServerAddressesFeature>(); 107if (server.Features.Get<IIISEnvironmentFeature>() is { } envFeature)
Sockets.BindTests (4)
src\Servers\Kestrel\shared\test\TransportTestHelpers\IHostPortExtensions.cs (1)
30return host.Services.GetRequiredService<IServer>().Features.Get<IServerAddressesFeature>().Addresses
src\Servers\Kestrel\test\BindTests\AddressRegistrationTests.cs (3)
632var serverAddresses = host.Services.GetRequiredService<IServer>().Features.Get<IServerAddressesFeature>().Addresses; 677var serverAddresses = host.Services.GetRequiredService<IServer>().Features.Get<IServerAddressesFeature>().Addresses; 717var serverAddresses = host.Services.GetRequiredService<IServer>().Features.Get<IServerAddressesFeature>().Addresses;
Sockets.FunctionalTests (1)
src\Servers\Kestrel\shared\test\TransportTestHelpers\IHostPortExtensions.cs (1)
30return host.Services.GetRequiredService<IServer>().Features.Get<IServerAddressesFeature>().Addresses
TestProject.ServiceA (1)
Program.cs (1)
13app.MapGet("/urls", (IServiceProvider sp) => sp.GetService<IServer>()?.Features?.Get<IServerAddressesFeature>()?.Addresses);
Wasm.Performance.Driver (1)
Program.cs (1)
329.Features