46 instantiations of RouteOptions
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (4)
DefaultApiDescriptionProviderTest.cs (2)
478
var routeOptions = new
RouteOptions
{ LowercaseUrls = true };
2251
Options.Create(routeOptions ?? new
RouteOptions
()));
EndpointMetadataApiDescriptionProviderTest.cs (2)
1373
new DefaultParameterPolicyFactory(Options.Create(new
RouteOptions
()), new TestServiceProvider()),
1569
new DefaultParameterPolicyFactory(Options.Create(new
RouteOptions
()), new TestServiceProvider()),
Microsoft.AspNetCore.Mvc.Core.Test (1)
Routing\AttributeRoutingTest.cs (1)
169
.Returns(new
RouteOptions
());
Microsoft.AspNetCore.OpenApi.Tests (2)
Services\OpenApiDocumentServiceTestsBase.cs (2)
71
var routeOptions = new
RouteOptions
();
150
var options = new
RouteOptions
();
Microsoft.AspNetCore.Routing.Microbenchmarks (5)
EndpointRoutingShortCircuitBenchmark.cs (2)
35
Options.Create(new
RouteOptions
()),
47
Options.Create(new
RouteOptions
()),
Matching\MatcherBuilderMultipleEntryBenchmark.cs (1)
57
_parameterPolicyFactory = new DefaultParameterPolicyFactory(Options.Create(new
RouteOptions
()), new TestServiceProvider());
src\Http\Routing\test\UnitTests\Matching\RouteMatcherBuilder.cs (1)
19
var routeOptions = new
RouteOptions
();
src\Http\Routing\test\UnitTests\Matching\TreeRouterMatcherBuilder.cs (1)
31
var routeOptions = new
RouteOptions
();
Microsoft.AspNetCore.Routing.Tests (34)
DefaultInlineConstraintResolverTest.cs (8)
18
var routeOptions = new
RouteOptions
();
259
var routeOptions = new
RouteOptions
();
274
var routeOptions = new
RouteOptions
();
289
var routeOptions = new
RouteOptions
();
299
var routeOptions = new
RouteOptions
();
314
var routeOptions = new
RouteOptions
();
329
var routeOptions = new
RouteOptions
();
348
var routeOptions = new
RouteOptions
();
DefaultParameterPolicyFactoryTest.cs (12)
35
var options = new
RouteOptions
();
195
var options = new
RouteOptions
();
214
var options = new
RouteOptions
();
235
var options = new
RouteOptions
();
258
var options = new
RouteOptions
();
279
var options = new
RouteOptions
();
300
var options = new
RouteOptions
();
322
var options = new
RouteOptions
();
343
var options = new
RouteOptions
();
364
var options = new
RouteOptions
();
384
var options = new
RouteOptions
();
405
options = new
RouteOptions
();
EndpointMiddlewareTest.cs (4)
16
private readonly IOptions<RouteOptions> RouteOptions = Options.Create(new
RouteOptions
());
205
var routeOptions = Options.Create(new
RouteOptions
{ SuppressCheckForUnhandledSecurityMetadata = true });
302
var routeOptions = Options.Create(new
RouteOptions
{ SuppressCheckForUnhandledSecurityMetadata = true });
400
var routeOptions = Options.Create(new
RouteOptions
{ SuppressCheckForUnhandledSecurityMetadata = true });
EndpointRoutingMiddlewareFormOptionsTest.cs (1)
222
Options.Create(new
RouteOptions
()),
EndpointRoutingMiddlewareTest.cs (1)
482
Options.Create(new
RouteOptions
()),
Matching\DfaMatcherBuilderTest.cs (1)
3544
Options.Create(new
RouteOptions
Matching\RouteMatcherBuilder.cs (1)
19
var routeOptions = new
RouteOptions
();
Matching\TreeRouterMatcherBuilder.cs (1)
31
var routeOptions = new
RouteOptions
();
RouteCollectionTest.cs (1)
653
options = new
RouteOptions
();
RouteConstraintBuilderTest.cs (1)
182
.Returns(new
RouteOptions
());
RouteTest.cs (1)
1850
var routeOptions = new
RouteOptions
();
RoutingMetricsTests.cs (1)
169
Options.Create(new
RouteOptions
()),
Tree\TreeRouterTest.cs (1)
2060
var options = new
RouteOptions
();
127 references to RouteOptions
Microsoft.AspNetCore.Mvc.ApiExplorer (3)
DefaultApiDescriptionProvider.cs (3)
30
private readonly
RouteOptions
_routeOptions;
42
/// <param name="routeOptions">The accessor for <see cref="
RouteOptions
"/>.</param>
49
IOptions<
RouteOptions
> routeOptions)
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (2)
DefaultApiDescriptionProviderTest.cs (2)
478
var
routeOptions = new RouteOptions { LowercaseUrls = true };
2223
RouteOptions
routeOptions = null)
Microsoft.AspNetCore.Mvc.Core (6)
DependencyInjection\MvcCoreRouteOptionsSetup.cs (5)
11
/// Sets up MVC default options for <see cref="
RouteOptions
"/>.
13
internal sealed class MvcCoreRouteOptionsSetup : IConfigureOptions<
RouteOptions
>
16
/// Configures the <see cref="
RouteOptions
"/>.
18
/// <param name="options">The <see cref="
RouteOptions
"/>.</param>
19
public void Configure(
RouteOptions
options)
DependencyInjection\MvcCoreServiceCollectionExtensions.cs (1)
141
ServiceDescriptor.Transient<IConfigureOptions<
RouteOptions
>, MvcCoreRouteOptionsSetup>());
Microsoft.AspNetCore.Mvc.Core.Test (6)
ApplicationModels\EndpointMetadataProviderTest.cs (1)
271
services.Configure<
RouteOptions
>(routeOptionsSetup.Configure);
DependencyInjection\MvcCoreServiceCollectionExtensionsTest.cs (1)
249
typeof(IConfigureOptions<
RouteOptions
>),
Routing\ActionEndpointDataSourceBaseTest.cs (1)
141
services.Configure<
RouteOptions
>(routeOptionsSetup.Configure);
Routing\ActionEndpointFactoryTest.cs (1)
22
serviceCollection.Configure<
RouteOptions
>(routeOptionsSetup.Configure);
Routing\AttributeRoutingTest.cs (1)
166
var routeOptions = new Mock<IOptions<
RouteOptions
>>();
Routing\KnownRouteValueConstraintTests.cs (1)
34
services.Configure<
RouteOptions
>(routeOptionsSetup.Configure);
Microsoft.AspNetCore.Mvc.RazorPages.Test (1)
src\Mvc\Mvc.Core\test\Routing\ActionEndpointDataSourceBaseTest.cs (1)
141
services.Configure<
RouteOptions
>(routeOptionsSetup.Configure);
Microsoft.AspNetCore.Mvc.Test (1)
MvcServiceCollectionExtensionsTest.cs (1)
487
typeof(IConfigureOptions<
RouteOptions
>),
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (2)
PageRemoteAttributeTest.cs (1)
193
provider => new DefaultInlineConstraintResolver(provider.GetRequiredService<IOptions<
RouteOptions
>>(), provider));
RemoteAttributeTest.cs (1)
494
provider => new DefaultInlineConstraintResolver(provider.GetRequiredService<IOptions<
RouteOptions
>>(), provider));
Microsoft.AspNetCore.OpenApi.Tests (2)
Services\OpenApiDocumentServiceTestsBase.cs (2)
71
var
routeOptions = new RouteOptions();
150
var
options = new RouteOptions();
Microsoft.AspNetCore.Routing (23)
Builder\EndpointRoutingApplicationBuilderExtensions.cs (1)
104
var routeOptions = builder.ApplicationServices.GetRequiredService<IOptions<
RouteOptions
>>();
ConfigureRouteOptions.cs (2)
9
internal sealed class ConfigureRouteOptions : IConfigureOptions<
RouteOptions
>
20
public void Configure(
RouteOptions
options)
DefaultInlineConstraintResolver.cs (2)
28
/// <param name="routeOptions">Accessor for <see cref="
RouteOptions
"/> containing the constraints of interest.</param>
31
public DefaultInlineConstraintResolver(IOptions<
RouteOptions
> routeOptions, IServiceProvider serviceProvider)
DefaultLinkGenerator.cs (1)
41
IOptions<
RouteOptions
> routeOptions,
DefaultParameterPolicyFactory.cs (4)
12
private readonly
RouteOptions
_options;
16
IOptions<
RouteOptions
> options,
49
typeof(
RouteOptions
),
50
nameof(
RouteOptions
.ConstraintMap)));
DependencyInjection\RoutingServiceCollectionExtensions.cs (3)
31
services.TryAddEnumerable(ServiceDescriptor.Singleton<IConfigureOptions<
RouteOptions
>, RegexInlineRouteConstraintSetup>());
71
services.TryAddEnumerable(ServiceDescriptor.Transient<IConfigureOptions<
RouteOptions
>, ConfigureRouteOptions>(
131
Action<
RouteOptions
> configureOptions)
EndpointMiddleware.cs (2)
21
private readonly
RouteOptions
_routeOptions;
26
IOptions<
RouteOptions
> routeOptions)
EndpointRoutingMiddleware.cs (2)
31
private readonly
RouteOptions
_routeOptions;
40
IOptions<
RouteOptions
> routeOptions,
RegexInlineRouteConstraintSetup.cs (2)
10
internal sealed class RegexInlineRouteConstraintSetup : IConfigureOptions<
RouteOptions
>
12
public void Configure(
RouteOptions
options)
RouteCollection.cs (2)
24
private
RouteOptions
? _options;
195
_options = context.RequestServices.GetRequiredService<IOptions<
RouteOptions
>>().Value;
RouteConstraintBuilder.cs (1)
129
/// based on <paramref name="constraintText"/>. See <see cref="
RouteOptions
.ConstraintMap"/> to register
RouteOptions.cs (1)
83
[RequiresUnreferencedCode($"The linker cannot determine what constraints are being added via the ConstraintMap property. Prefer {nameof(
RouteOptions
)}.{nameof(SetParameterPolicy)} instead for setting constraints. This warning can be suppressed if this property is being used to read or delete constraints.")]
Microsoft.AspNetCore.Routing.Microbenchmarks (2)
src\Http\Routing\test\UnitTests\Matching\RouteMatcherBuilder.cs (1)
19
var
routeOptions = new RouteOptions();
src\Http\Routing\test\UnitTests\Matching\TreeRouterMatcherBuilder.cs (1)
31
var
routeOptions = new RouteOptions();
Microsoft.AspNetCore.Routing.Tests (71)
Builder\EndpointRoutingApplicationBuilderExtensionsTest.cs (1)
323
var routeOptions = app.ApplicationServices.GetRequiredService<IOptions<
RouteOptions
>>();
DefaultInlineConstraintResolverTest.cs (10)
18
var
routeOptions = new RouteOptions();
259
var
routeOptions = new RouteOptions();
274
var
routeOptions = new RouteOptions();
289
var
routeOptions = new RouteOptions();
299
var
routeOptions = new RouteOptions();
314
var
routeOptions = new RouteOptions();
329
var
routeOptions = new RouteOptions();
348
var
routeOptions = new RouteOptions();
366
private IInlineConstraintResolver GetInlineConstraintResolver(
RouteOptions
routeOptions)
368
var optionsAccessor = new Mock<IOptions<
RouteOptions
>>();
DefaultLinkGeneratorProcessTemplateTest.cs (11)
262
s.Configure<
RouteOptions
>(o => o.LowercaseUrls = true);
291
s.Configure<
RouteOptions
>(o => o.LowercaseUrls = true);
347
s.Configure<
RouteOptions
>(o => o.LowercaseUrls = true);
380
s.Configure<
RouteOptions
>(o =>
414
s.Configure<
RouteOptions
>(o => o.AppendTrailingSlash = true);
444
s.Configure<
RouteOptions
>(o =>
479
s.Configure<
RouteOptions
>(o => o.LowercaseUrls = true);
512
s.Configure<
RouteOptions
>(o => o.LowercaseUrls = false);
545
s.Configure<
RouteOptions
>(o =>
583
s.Configure<
RouteOptions
>(o =>
621
s.Configure<
RouteOptions
>(o => o.AppendTrailingSlash = false);
DefaultLinkGeneratorTest.cs (4)
177
s.Configure<
RouteOptions
>(o =>
203
s.Configure<
RouteOptions
>(o =>
315
s.Configure<
RouteOptions
>(o =>
341
s.Configure<
RouteOptions
>(o =>
DefaultParameterPolicyFactoryTest.cs (14)
27
$"Register the constraint type with '{typeof(
RouteOptions
)}.{nameof(
RouteOptions
.ConstraintMap)}'.",
35
var
options = new RouteOptions();
195
var
options = new RouteOptions();
214
var
options = new RouteOptions();
235
var
options = new RouteOptions();
258
var
options = new RouteOptions();
279
var
options = new RouteOptions();
300
var
options = new RouteOptions();
322
var
options = new RouteOptions();
343
var
options = new RouteOptions();
364
var
options = new RouteOptions();
384
var
options = new RouteOptions();
400
RouteOptions
options = null,
EndpointMiddlewareTest.cs (1)
16
private readonly IOptions<
RouteOptions
> RouteOptions = Options.Create(new RouteOptions());
InlineRouteParameterParserTests.cs (2)
960
services.Configure<
RouteOptions
>(options =>
965
var accessor = serviceProvider.GetRequiredService<IOptions<
RouteOptions
>>();
LinkGeneratorTestBase.cs (2)
59
services.Configure<
RouteOptions
>(o =>
71
var routeOptions = serviceProvider.GetRequiredService<IOptions<
RouteOptions
>>();
LinkParserTestBase.cs (2)
51
services.Configure<
RouteOptions
>(o =>
63
var routeOptions = serviceProvider.GetRequiredService<IOptions<
RouteOptions
>>();
Matching\RouteMatcherBuilder.cs (1)
19
var
routeOptions = new RouteOptions();
Matching\TreeRouterMatcherBuilder.cs (1)
31
var
routeOptions = new RouteOptions();
RouteCollectionTest.cs (7)
591
Action<
RouteOptions
> options = null)
617
Action<
RouteOptions
> options = null,
626
services.Configure<
RouteOptions
>(options);
644
RouteOptions
options = null)
659
var optionsAccessor = new Mock<IOptions<
RouteOptions
>>(MockBehavior.Strict);
665
context.Setup(m => m.RequestServices.GetService(typeof(IOptions<
RouteOptions
>)))
692
private static Action<
RouteOptions
> GetRouteOptions(
RouteConstraintBuilderTest.cs (1)
179
var options = new Mock<IOptions<
RouteOptions
>>(MockBehavior.Strict);
RouteOptionsTests.cs (3)
24
var accessor = serviceProvider.GetRequiredService<IOptions<
RouteOptions
>>();
40
var
options = serviceProvider.GetRequiredService<IOptions<
RouteOptions
>>().Value;
RouteTest.cs (4)
1764
services.Configure<
RouteOptions
>(ConfigureRouteOptions);
1850
var
routeOptions = new RouteOptions();
1853
var routeOptionsMock = new Mock<IOptions<
RouteOptions
>>();
1861
private static void ConfigureRouteOptions(
RouteOptions
options)
RoutingServiceCollectionExtensionsTests.cs (2)
69
services.Configure<
RouteOptions
>(options =>
79
var options = provider.GetService<IOptions<
RouteOptions
>>();
TemplateParserDefaultValuesTests.cs (2)
132
services.Configure<
RouteOptions
>(options => {
148
var accessor = serviceProvider.GetRequiredService<IOptions<
RouteOptions
>>();
Tree\TreeRouteBuilderTest.cs (1)
259
var accessor = serviceProvider.GetRequiredService<IOptions<
RouteOptions
>>();
Tree\TreeRouterTest.cs (2)
2060
var
options = new RouteOptions();
2063
var optionsMock = new Mock<IOptions<
RouteOptions
>>();
Microsoft.AspNetCore.Tests (2)
WebApplicationTests.cs (1)
2644
builder.Services.AddRoutingCore().Configure<
RouteOptions
>(options =>
WebHostTests.cs (1)
121
var routeOptions = host.Services.GetService<IOptions<
RouteOptions
>>();
Mvc.RoutingWebSite (6)
StartupForDynamic.cs (1)
24
services.Configure<
RouteOptions
>(options => options.ConstraintMap["slugify"] = typeof(SlugifyParameterTransformer));
StartupForDynamicAndRazorPages.cs (1)
19
services.Configure<
RouteOptions
>(options => options.ConstraintMap["slugify"] = typeof(SlugifyParameterTransformer));
StartupForDynamicOrder.cs (1)
39
services.Configure<
RouteOptions
>(options => options.ConstraintMap["slugify"] = typeof(SlugifyParameterTransformer));
StartupForEndpointFilters.cs (1)
17
services.Configure<
RouteOptions
>(options => options.ConstraintMap["slugify"] = typeof(SlugifyParameterTransformer));
StartupForFallback.cs (1)
22
services.Configure<
RouteOptions
>(options => options.ConstraintMap["slugify"] = typeof(SlugifyParameterTransformer));
StartupForGroups.cs (1)
17
services.Configure<
RouteOptions
>(options => options.ConstraintMap["slugify"] = typeof(SlugifyParameterTransformer));