173 references to AddOptions
Aspire.Dashboard.Components.Tests (1)
Layout\MainLayoutTests.cs (1)
128Services.AddOptions();
Microsoft.AspNetCore.Authentication.Core.Test (27)
AuthenticationSchemeProviderTests.cs (12)
17var services = new ServiceCollection().AddOptions().AddAuthenticationCore(o => 30var services = new ServiceCollection().AddOptions().AddAuthenticationCore(o => 43var services = new ServiceCollection().AddOptions().AddAuthenticationCore(o => 59var services = new ServiceCollection().AddOptions().AddAuthenticationCore(o => 77var services = new ServiceCollection().AddOptions().AddAuthenticationCore(o => 93var services = new ServiceCollection().AddOptions().AddAuthenticationCore(o => 109var services = new ServiceCollection().AddOptions().AddAuthenticationCore(o => 134var services = new ServiceCollection().AddOptions().AddAuthenticationCore(o => 147var services = new ServiceCollection().AddOptions().AddAuthenticationCore(o => 161var services = new ServiceCollection().AddOptions().AddAuthenticationCore(o => 178var services = new ServiceCollection().AddOptions() 197var services = new ServiceCollection().AddOptions().AddAuthenticationCore(o =>
AuthenticationServiceTests.cs (13)
15var services = new ServiceCollection().AddOptions().AddAuthenticationCore(o => 31var services = new ServiceCollection().AddOptions().AddAuthenticationCore(o => 54var services = new ServiceCollection().AddOptions().AddAuthenticationCore(o => 69var services = new ServiceCollection().AddOptions().AddAuthenticationCore(o => 84var services = new ServiceCollection().AddOptions().AddAuthenticationCore(o => 98var services = new ServiceCollection().AddOptions().AddAuthenticationCore(o => 113var services = new ServiceCollection().AddOptions().AddAuthenticationCore(o => 136var services = new ServiceCollection().AddOptions().AddAuthenticationCore(o => 157var services = new ServiceCollection().AddOptions().AddAuthenticationCore(o => 177var services = new ServiceCollection().AddOptions().AddAuthenticationCore(o => 195var services = new ServiceCollection().AddOptions().AddAuthenticationCore(o => 213var services = new ServiceCollection().AddOptions().AddAuthenticationCore(o => 232var services = new ServiceCollection().AddOptions().AddAuthenticationCore(o =>
TokenExtensionTests.cs (2)
126var services = new ServiceCollection().AddOptions() 143var services = new ServiceCollection().AddOptions()
Microsoft.AspNetCore.Authentication.Test (2)
AuthenticationMiddlewareTests.cs (1)
210serviceCollection.AddOptions();
TestExtensions.cs (1)
82=> services.AddOptions()
Microsoft.AspNetCore.Authorization (1)
AuthorizationServiceCollectionExtensions.cs (1)
28services.AddOptions();
Microsoft.AspNetCore.Authorization.Test (5)
AuthorizationBuilderTests.cs (1)
113services.AddOptions();
AuthorizationMiddlewareTests.cs (1)
1039serviceCollection.AddOptions();
DefaultAuthorizationServiceTests.cs (1)
19services.AddOptions();
PassThroughAuthorizationHandlerTests.cs (1)
17services.AddOptions();
PolicyEvaluatorTests.cs (1)
164.AddOptions();
Microsoft.AspNetCore.Components.Server.Tests (1)
ComponentEndpointRouteBuilderExtensionsTest.cs (1)
133services.AddOptions();
Microsoft.AspNetCore.Cors (1)
CorsServiceCollectionExtensions.cs (1)
23services.AddOptions();
Microsoft.AspNetCore.DataProtection (1)
DataProtectionServiceCollectionExtensions.cs (1)
37services.AddOptions();
Microsoft.AspNetCore.Hosting (1)
WebHostBuilder.cs (1)
294services.AddOptions();
Microsoft.AspNetCore.Hosting.Tests (18)
Fakes\Startup.cs (7)
17services.AddOptions(); 23services.AddOptions(); 33services.AddOptions(); 43services.AddOptions(); 53var services = new ServiceCollection().AddOptions(); 74services.AddOptions(); 85var services = new ServiceCollection().AddOptions();
Fakes\StartupBase.cs (1)
12services.AddOptions();
Fakes\StartupCaseInsensitive.cs (1)
14services.AddOptions();
HostingApplicationTests.cs (1)
184services.AddOptions();
HostingMetricsTests.cs (1)
190services.AddOptions();
Http\DefaultHttpContextFactoryTests.cs (6)
16.AddOptions() 34.AddOptions() 56.AddOptions() 70.AddOptions() 88.AddOptions() 106.AddOptions()
WebHostTests.cs (1)
740using (var host = CreateBuilder().UseFakeServer().ConfigureServices(services => services.AddOptions()).Build())
Microsoft.AspNetCore.Http.Connections.Tests (27)
HttpConnectionDispatcherTests.cs (27)
64services.AddOptions(); 88services.AddOptions(); 114services.AddOptions(); 151services.AddOptions(); 179services.AddOptions(); 225services.AddOptions(); 266services.AddOptions(); 305services.AddOptions(); 347services.AddOptions(); 385services.AddOptions(); 424services.AddOptions(); 464services.AddOptions(); 527services.AddOptions(); 595services.AddOptions(); 658services.AddOptions(); 760services.AddOptions(); 856services.AddOptions(); 904services.AddOptions(); 932services.AddOptions(); 1835services.AddOptions(); 1887services.AddOptions(); 1941services.AddOptions(); 2268services.AddOptions(); 2294services.AddOptions(); 2323services.AddOptions(); 2352services.AddOptions(); 3694services.AddOptions();
Microsoft.AspNetCore.HttpOverrides.Tests (2)
CertificateForwardingTest.cs (2)
21.AddOptions() 31.AddOptions()
Microsoft.AspNetCore.Mvc.Core.Test (13)
Authorization\AuthorizeFilterTest.cs (2)
470.AddOptions() 602serviceCollection.AddOptions();
Builder\MvcAreaRouteBuilderExtensionsTest.cs (1)
272services.AddOptions();
DependencyInjection\MvcBuilderExtensionsTest.cs (1)
138.AddOptions();
DependencyInjection\MvcCoreBuilderExtensionsTest.cs (1)
81.AddOptions();
Infrastructure\JsonResultExecutorTestBase.cs (1)
484services.AddOptions();
Routing\AttributeRouteTest.cs (2)
770.AddOptions() 812.AddOptions()
Routing\AttributeRoutingTest.cs (1)
177services.AddOptions();
Routing\ControllerLinkGeneratorExtensionsTest.cs (1)
215services.AddOptions();
Routing\PageLinkGeneratorExtensionsTest.cs (1)
185services.AddOptions();
Routing\UrlHelperBaseTest.cs (1)
105services.AddOptions();
Routing\UrlHelperTestBase.cs (1)
1161services.AddOptions();
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (2)
NewtonsoftJsonOutputFormatterTest.cs (1)
60.AddOptions()
src\Mvc\Mvc.Core\test\Infrastructure\JsonResultExecutorTestBase.cs (1)
484services.AddOptions();
Microsoft.AspNetCore.Mvc.Razor.Test (2)
RazorViewEngineOptionsTest.cs (2)
16var services = new ServiceCollection().AddOptions(); 47var services = new ServiceCollection().AddOptions();
Microsoft.AspNetCore.Mvc.RazorPages.Test (2)
Builder\PageActionEndpointConventionBuilderResourceCollectionExtensionsTest.cs (1)
222collection.AddOptions();
DependencyInjection\MvcRazorPagesMvcBuilderExtensionsTest.cs (1)
18var services = new ServiceCollection().AddOptions()
Microsoft.AspNetCore.Mvc.Test (1)
MvcServiceCollectionExtensionsTest.cs (1)
408services.AddOptions();
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (4)
Builder\ControllerActionEndpointConventionBuilderResourceCollectionExtensionsTest.cs (1)
295collection.AddOptions();
PageRemoteAttributeTest.cs (1)
189serviceCollection.AddOptions();
RemoteAttributeBaseTest.cs (1)
469serviceCollection.AddOptions();
RemoteAttributeTest.cs (1)
490serviceCollection.AddOptions();
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (1)
StackExchangeRedisCacheServiceCollectionExtensions.cs (1)
28services.AddOptions();
Microsoft.AspNetCore.ResponseCompression.Microbenchmarks (1)
ResponseCompressionProviderBenchmark.cs (1)
18.AddOptions()
Microsoft.AspNetCore.Routing.Microbenchmarks (1)
EndpointRoutingBenchmarkBase.cs (1)
31services.AddOptions();
Microsoft.AspNetCore.Routing.Tests (24)
Builder\EndpointRoutingApplicationBuilderExtensionsTest.cs (1)
360services.AddOptions();
Builder\RoutingBuilderExtensionsTest.cs (1)
127services.AddOptions();
EndpointRoutingMiddlewareTest.cs (1)
405services.AddOptions();
InlineRouteParameterParserTests.cs (1)
959var services = new ServiceCollection().AddOptions();
LinkGeneratorTestBase.cs (1)
24services.AddOptions();
LinkParserTestBase.cs (1)
16services.AddOptions();
Matching\DfaMatcherConformanceTest.cs (1)
66.AddOptions()
Matching\DfaMatcherTest.cs (1)
31.AddOptions()
Matching\HostMatcherPolicyIntegrationTestBase.cs (1)
370.AddOptions()
Matching\HttpMethodMatcherPolicyIntegrationTestBase.cs (1)
349.AddOptions()
Patterns\DefaultRoutePatternTransformerTest.cs (1)
15services.AddOptions();
RequestDelegateRouteBuilderExtensionsTest.cs (1)
126services.AddOptions();
RouteCollectionTest.cs (2)
601services.AddOptions(); 622services.AddOptions();
RouteHandlerOptionsTests.cs (3)
21services.AddOptions(); 48services.AddOptions(); 61services.AddOptions();
RouteOptionsTests.cs (2)
17services.AddOptions(); 33services.AddOptions();
RouteTest.cs (2)
655services.AddOptions(); 1517services.AddOptions();
RoutingServiceCollectionExtensionsTests.cs (1)
67services.AddOptions();
TemplateParserDefaultValuesTests.cs (1)
146var services = new ServiceCollection().AddOptions();
Tree\TreeRouteBuilderTest.cs (1)
257var services = new ServiceCollection().AddOptions();
Microsoft.AspNetCore.SignalR.Tests (1)
HubConnectionHandlerTestUtils\Utils.cs (1)
59services.AddOptions()
Microsoft.Extensions.Caching.Hybrid (1)
HybridCacheServiceExtensions.cs (1)
37_ = services.AddOptions().AddMemoryCache();
Microsoft.Extensions.Caching.Memory (2)
MemoryCacheServiceCollectionExtensions.cs (2)
26services.AddOptions(); 70services.AddOptions();
Microsoft.Extensions.Caching.SqlServer (1)
SqlServerCachingServicesExtensions.cs (1)
27services.AddOptions();
Microsoft.Extensions.Caching.StackExchangeRedis (1)
StackExchangeRedisCacheServiceCollectionExtensions.cs (1)
29services.AddOptions();
Microsoft.Extensions.Diagnostics (1)
Metrics\MetricsServiceExtensions.cs (1)
30services.AddOptions();
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (4)
DefaultHealthCheckServiceTest.cs (2)
32serviceCollection.AddOptions(); 630services.AddOptions();
DependencyInjection\HealthChecksBuilderTest.cs (1)
227services.AddOptions();
HealthCheckPublisherHostedServiceTest.cs (1)
743serviceCollection.AddOptions();
Microsoft.Extensions.Hosting (1)
HostBuilder.cs (1)
328services.AddOptions().Configure<HostOptions>(options => { options.Initialize(hostBuilderContext.Configuration); });
Microsoft.Extensions.Http (1)
DependencyInjection\HttpClientFactoryServiceCollectionExtensions.cs (1)
31services.AddOptions();
Microsoft.Extensions.Identity.Core (1)
IdentityServiceCollectionExtensions.cs (1)
37services.AddOptions().AddLogging();
Microsoft.Extensions.Localization (2)
LocalizationServiceCollectionExtensions.cs (2)
25services.AddOptions(); 47services.AddOptions();
Microsoft.Extensions.Logging (1)
LoggingServiceCollectionExtensions.cs (1)
36services.AddOptions();
Microsoft.Extensions.ML (1)
ServiceCollectionExtensions.cs (1)
82.AddOptions()
Microsoft.Extensions.ML.Tests (7)
FileLoaderTests.cs (3)
30.AddOptions() 43.AddOptions() 62.AddOptions()
PredictionEnginePoolTests.cs (1)
30.AddOptions()
UriLoaderTests.cs (3)
30.AddOptions() 43.AddOptions() 62.AddOptions()
Microsoft.Extensions.Options (6)
OptionsServiceCollectionExtensions.cs (6)
72services.AddOptions().TryAddEnumerable(ServiceDescriptor.Singleton<IValidateOptions<TOptions>, TValidateOptions>()); 101services.AddOptions(); 142services.AddOptions(); 216services.AddOptions(); 243services.AddOptions(); 282services.AddOptions();
Microsoft.Extensions.Options.ConfigurationExtensions (1)
OptionsConfigurationServiceCollectionExtensions.cs (1)
72services.AddOptions();
Microsoft.Extensions.Options.Contextual (1)
ContextualOptionsServiceCollectionExtensions.cs (1)
27_ = Throw.IfNull(services).AddOptions();
Microsoft.Extensions.ServiceDiscovery (1)
ServiceDiscoveryServiceCollectionExtensions.cs (1)
61services.AddOptions();
Microsoft.Extensions.WebEncoders (1)
EncoderServiceCollectionExtensions.cs (1)
28services.AddOptions();