Implemented interface member:

property
Services
Microsoft.Extensions.Hosting.IHostApplicationBuilder.Services
253 references to Services
ApiGateway (1)
Aspire.Dashboard (41)
DashboardWebApplication.cs (41)
158builder.Services.AddOptions<DashboardOptions>()
161builder.Services.AddSingleton<IPostConfigureOptions<DashboardOptions>, PostConfigureDashboardOptions>();
162builder.Services.AddSingleton<IValidateOptions<DashboardOptions>, ValidateDashboardOptions>();
190builder.Services.Configure<HttpsRedirectionOptions>(options => options.HttpsPort = browserHttpsPort);
193builder.Services.AddSingleton<IPolicyEvaluator, AspirePolicyEvaluator>();
198builder.Services.AddRazorComponents().AddInteractiveServerComponents();
199builder.Services.AddCascadingAuthenticationState();
200builder.Services.AddResponseCompression(options =>
207builder.Services.AddHealthChecks();
210builder.Services.AddCors(options =>
234builder.Services.TryAddSingleton<IDashboardClient, DashboardClient>();
235builder.Services.TryAddScoped<DashboardCommandExecutor>();
237builder.Services.AddSingleton<PauseManager>();
240builder.Services.TryAddScoped<ComponentTelemetryContextProvider>();
241builder.Services.TryAddSingleton<DashboardTelemetryService>();
242builder.Services.TryAddSingleton<IDashboardTelemetrySender, DashboardTelemetrySender>();
243builder.Services.AddSingleton<ILoggerProvider, TelemetryLoggerProvider>();
246builder.Services.AddGrpc();
247builder.Services.AddSingleton<TelemetryRepository>();
248builder.Services.AddTransient<StructuredLogsViewModel>();
250builder.Services.AddTransient<OtlpLogsService>();
251builder.Services.AddTransient<OtlpTraceService>();
252builder.Services.AddTransient<OtlpMetricsService>();
254builder.Services.AddTransient<TracesViewModel>();
255builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<IOutgoingPeerResolver, ResourceOutgoingPeerResolver>());
256builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<IOutgoingPeerResolver, BrowserLinkOutgoingPeerResolver>());
258builder.Services.AddFluentUIComponents();
260builder.Services.AddScoped<IThemeResolver, BrowserThemeResolver>();
261builder.Services.AddScoped<ThemeManager>();
263builder.Services.AddScoped<ShortcutManager>();
264builder.Services.AddScoped<ConsoleLogsManager>();
265builder.Services.AddSingleton<IInstrumentUnitResolver, DefaultInstrumentUnitResolver>();
268builder.Services.AddScoped<BrowserTimeProvider>();
269builder.Services.AddScoped<ILocalStorage, LocalBrowserStorage>();
270builder.Services.AddScoped<ISessionStorage, SessionBrowserStorage>();
272builder.Services.AddSingleton<IKnownPropertyLookup, KnownPropertyLookup>();
274builder.Services.AddScoped<DimensionManager>();
276builder.Services.AddLocalization();
278builder.Services.AddAntiforgery(options =>
668var authentication = builder.Services
795builder.Services.AddAuthorization(options =>
Aspire.Dashboard.Tests (6)
Aspire.Hosting (15)
AzureAIFoundryEndToEnd.WebStory (1)
BasketService (2)
BlazorUnitedApp (2)
BrowserTelemetry.Web (1)
CatalogDb (4)
CatalogService (1)
CdkSample.ApiService (2)
CookieSample (1)
GetDocumentSample (2)
IdentitySample.ApiEndpoints (3)
IdentitySample.PasskeyConformance (4)
IdentitySample.PasskeyUI (8)
Keycloak.ApiService (3)
Keycloak.Web (6)
Microsoft.AspNetCore (2)
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (3)
Microsoft.AspNetCore.Authentication.Test (3)
Microsoft.AspNetCore.Authorization.Test (2)
Microsoft.AspNetCore.Diagnostics.Tests (1)
Microsoft.AspNetCore.Identity.FunctionalTests (4)
Microsoft.AspNetCore.Mvc.FunctionalTests (12)
Microsoft.AspNetCore.OpenApi (4)
Microsoft.AspNetCore.Rewrite.Tests (5)
Microsoft.AspNetCore.Tests (68)
WebApplicationTests.cs (68)
54builder.Services.AddRoutingCore();
84builder.Services.AddRoutingCore();
114builder.Services.AddRoutingCore();
180builder.Services.AddSingleton<IServer>(server);
201builder.Services.AddSingleton<IServer>(server);
220builder.Services.AddSingleton<IServer>(server);
239builder.Services.AddSingleton<IServer>(server);
259builder.Services.AddSingleton<IServer>(server);
279builder.Services.AddSingleton<IServer>(new MockAddressesServer());
293builder.Services.AddSingleton<IHostedService>(hostedService);
294builder.Services.AddSingleton<IServer>(server);
352builder.Services.AddSingleton<IServer>(new MockAddressesServer());
363builder.Services.AddSingleton<IServer>(new MockAddressesServer(new List<string>().AsReadOnly()));
1386var sp = builder.Services.BuildServiceProvider();
1402builder.Services.AddSingleton<IConfiguration>(builder.Configuration);
1403var sp = builder.Services.BuildServiceProvider();
1474builder.Services.AddSingleton(builder.Services);
1504builder.Services.AddSingleton(builder.Services);
1531using (var serviceProvider = builder.Services.BuildServiceProvider())
1550builder.Services.AddSingleton(builder.Services);
1554builder.Services.AddSingleton<IHostLifetime, CustomHostLifetime>();
1666builder.Services.AddSingleton<IStartupFilter, TerminalMiddlewareStartupFilter>();
1688builder.Services.AddSingleton<IStartupFilter, UseRoutingStartupFilter>();
1753Assert.Single(builder.Services.Where(descriptor => descriptor.ServiceType == typeof(IConfigureOptions<LoggerFactoryOptions>)));
1755Assert.Single(builder.Services.Where(descriptor => descriptor.ServiceType == typeof(IWebHostEnvironment)));
1756Assert.Single(builder.Services.Where(descriptor => descriptor.ServiceType == typeof(IOptionsChangeTokenSource<HostFilteringOptions>)));
1757Assert.Single(builder.Services.Where(descriptor => descriptor.ServiceType == typeof(IServer)));
1758Assert.Single(builder.Services.Where(descriptor => descriptor.ServiceType == typeof(EndpointDataSource)));
1773Assert.DoesNotContain(builder.Services, descriptor => descriptor.ServiceType == typeof(IConfigureOptions<LoggerFactoryOptions>));
1774Assert.DoesNotContain(builder.Services, descriptor => descriptor.ServiceType == typeof(IOptionsChangeTokenSource<HostFilteringOptions>));
1775Assert.DoesNotContain(builder.Services, descriptor => descriptor.ServiceType == typeof(IServer));
1776Assert.DoesNotContain(builder.Services, descriptor => descriptor.ServiceType == typeof(EndpointDataSource));
1779Assert.Single(builder.Services.Where(descriptor => descriptor.ServiceType == typeof(IWebHostEnvironment)));
1789builder.Services.AddScoped<Service>();
1790builder.Services.AddSingleton<Service2>();
1803builder.Services.AddScoped<Service>();
1804builder.Services.AddSingleton<Service2>();
1817Assert.Throws<InvalidOperationException>(() => builder.Services.AddSingleton<IService>(new Service()));
1818Assert.Throws<InvalidOperationException>(() => builder.Services.TryAddSingleton(new Service()));
1819Assert.Throws<InvalidOperationException>(() => builder.Services.AddScoped<IService, Service>());
1820Assert.Throws<InvalidOperationException>(() => builder.Services.TryAddScoped<IService, Service>());
1821Assert.Throws<InvalidOperationException>(() => builder.Services.Remove(ServiceDescriptor.Singleton(new Service())));
1822Assert.Throws<InvalidOperationException>(() => builder.Services[0] = ServiceDescriptor.Singleton(new Service()));
2015builder.Services.AddSingleton<IStartupFilter, PropertyFilter>();
2051builder.Services.AddSingleton<IStartupFilter, ThrowingStartupFilter>();
2421Assert.Contains(builder.Services, service => service.ServiceType == typeof(HostBuilderContext));
2422Assert.Contains(builder.Services, service => service.ServiceType == typeof(IHostApplicationLifetime));
2423Assert.Contains(builder.Services, service => service.ServiceType == typeof(IHostLifetime));
2424Assert.Contains(builder.Services, service => service.ServiceType == typeof(IOptions<>));
2425Assert.Contains(builder.Services, service => service.ServiceType == typeof(ILoggerFactory));
2426Assert.Contains(builder.Services, service => service.ServiceType == typeof(ILogger<>));
2439builder.Services.AddAuthorization();
2440builder.Services.AddAuthentication("testSchemeName")
2479builder.Services.AddAuthorization();
2480builder.Services.AddAuthentication("testSchemeName")
2525Assert.Same(builder.Services, iHostApplicationBuilder.Services);
2617builder.Services.AddRouting();
2644builder.Services.AddRoutingCore().Configure<RouteOptions>(options =>
2681builder.Services.AddSingleton<IDebugger>(new TestDebugger(true));
2712builder.Services.AddSingleton<IDebugger>(new TestDebugger(false));
2733builder.Services.AddAuthenticationCore();
2734builder.Services.AddAuthorization();
2735builder.Services.AddSingleton<IDebugger>(new TestDebugger(true));
2761builder.Services.AddSingleton<IDebugger>(new TestDebugger(true));
2778builder.Services.AddSingleton<IDebugger>(new TestDebugger(true));
MilvusPlayground.ApiService (1)
MinimalFormSample (1)
MinimalJwtBearerSample (2)
MinimalOpenIdConnectSample (2)
MinimalValidationSample (1)
MvcFormSample (1)
MyFrontend (4)
MySql.ApiService (1)
Nats.Backend (1)
OpenAIEndToEnd.WebStory (1)
OutputCachingSample (1)
Publishers.Frontend (2)
Qdrant.ApiService (1)
RateLimitingSample (4)
Sample (10)
SignalRServerlessWeb (2)
SignalRWeb (2)
SimpleWebSiteWithWebApplicationBuilder (2)
Stress.ApiService (2)
TestProject.IntegrationServiceA (1)
WaitFor.Frontend (2)
WebPubSubWeb (2)