292 instantiations of MvcOptions
BasicWebSite (1)
Controllers\ContentNegotiation\NormalController.cs (1)
28_indentingFormatter = new NewtonsoftJsonOutputFormatter(_indentedSettings, charPool, new MvcOptions(), new MvcNewtonsoftJsonOptions());
FormatterWebSite (1)
Controllers\JsonFormatterController.cs (1)
27_indentingFormatter = new NewtonsoftJsonOutputFormatter(_indentedSettings, charPool, new MvcOptions(), new MvcNewtonsoftJsonOptions());
Microsoft.AspNetCore.Mvc.Abstractions.Test (1)
ModelBinding\ModelStateDictionaryTest.cs (1)
1763public MvcOptions Value { get; } = new MvcOptions();
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (11)
ApiResponseTypeProviderTest.cs (3)
718var provider = new ApiResponseTypeProvider(new EmptyModelMetadataProvider(), new ActionResultTypeMapper(), new MvcOptions()); 758var provider = new ApiResponseTypeProvider(new EmptyModelMetadataProvider(), new ActionResultTypeMapper(), new MvcOptions()); 769var mvcOptions = new MvcOptions
DefaultApiDescriptionProviderTest.cs (8)
2026DefaultApiDescriptionProvider.ProcessIsRequired(context, new MvcOptions()); 2040DefaultApiDescriptionProvider.ProcessIsRequired(context, new MvcOptions { AllowEmptyInputInBodyModelBinding = true }); 2061DefaultApiDescriptionProvider.ProcessIsRequired(context, new MvcOptions()); 2083DefaultApiDescriptionProvider.ProcessIsRequired(context, new MvcOptions()); 2101DefaultApiDescriptionProvider.ProcessIsRequired(context, new MvcOptions()); 2115DefaultApiDescriptionProvider.ProcessIsRequired(context, new MvcOptions()); 2134DefaultApiDescriptionProvider.ProcessIsRequired(context, new MvcOptions()); 2227var options = new MvcOptions();
Microsoft.AspNetCore.Mvc.Core (1)
ModelBinding\EmptyModelMetadataProvider.cs (1)
28public MvcOptions Value { get; } = new MvcOptions();
Microsoft.AspNetCore.Mvc.Core.Test (134)
AcceptedAtActionResultTests.cs (1)
268var options = Options.Create(new MvcOptions());
AcceptedAtRouteResultTests.cs (1)
176var options = Options.Create(new MvcOptions());
AcceptedResultTests.cs (1)
133var options = Options.Create(new MvcOptions());
ApplicationModels\AuthorizationApplicationModelProviderTest.cs (4)
16private readonly IOptions<MvcOptions> OptionsWithoutEndpointRouting = Options.Create(new MvcOptions { EnableEndpointRouting = false }); 24Options.Create(new MvcOptions())); 42Options.Create(new MvcOptions())); 209Options.Create(new MvcOptions()),
ApplicationModels\ConsumesConstraintForFormFileParameterConventionTest.cs (1)
61var mvcOptions = Options.Create(new MvcOptions());
ApplicationModels\ControllerActionDescriptorProviderTests.cs (5)
696var options = Options.Create(new MvcOptions()); 1150var options = Options.Create(new MvcOptions()); 1328var options = Options.Create(new MvcOptions()); 1351var options = Options.Create(new MvcOptions()); 1367var options = Options.Create(new MvcOptions());
ApplicationModels\DefaultApplicationModelProviderTest.cs (11)
24var options = new MvcOptions() 65new MvcOptions(), 119var provider = new TestApplicationModelProvider(new MvcOptions(), modelMetadataProvider); 169new MvcOptions(), 213new MvcOptions(), 258var options = new MvcOptions(); 286var options = new MvcOptions(); 314var options = new MvcOptions(); 334var options = new MvcOptions { SuppressAsyncSuffixInActionNames = false }; 354var options = new MvcOptions(); 1868: this(new MvcOptions(), new EmptyModelMetadataProvider())
ApplicationModels\EndpointMetadataProviderTest.cs (1)
242var options = Options.Create(new MvcOptions());
ApplicationModels\InferParameterBindingInfoConventionTest.cs (1)
913var mvcOptions = Options.Create(new MvcOptions());
ControllerBaseTest.cs (4)
3072new MvcOptions()); 3109new MvcOptions()); 3146new MvcOptions()); 3230ObjectValidator = new DefaultObjectValidator(metadataProvider, validatorProviders, new MvcOptions()),
Controllers\ControllerBinderDelegateProviderTest.cs (1)
25private static readonly MvcOptions _options = new MvcOptions();
Controllers\DefaultControllerActivatorTest.cs (1)
178.Returns(new DefaultObjectValidator(metadataProvider, new List<IModelValidatorProvider>(), new MvcOptions()));
Controllers\DefaultControllerFactoryTest.cs (1)
233new MvcOptions()));
CreatedAtActionResultTests.cs (1)
86var options = Options.Create(new MvcOptions());
CreatedAtRouteResultTests.cs (1)
100var options = Options.Create(new MvcOptions());
CreatedResultTests.cs (1)
133var options = Options.Create(new MvcOptions());
DependencyInjection\ApplicationModelConventionExtensionsTest.cs (4)
28var options = new MvcOptions(); 68var options = new MvcOptions(); 126var options = new MvcOptions(); 151var options = new MvcOptions();
Filters\MiddlewareFilterTest.cs (1)
264var options = new MvcOptions();
Formatters\FormatFilterTest.cs (1)
457OptionsManager = Options.Create(new MvcOptions());
HttpNotFoundObjectResultTest.cs (1)
66var options = Options.Create(new MvcOptions());
HttpOkObjectResultTest.cs (1)
68var options = Options.Create(new MvcOptions());
Infrastructure\ActionSelectorTest.cs (1)
1002var options = Options.Create(new MvcOptions());
Infrastructure\AsyncEnumerableReaderTest.cs (12)
18var options = new MvcOptions(); 33var options = new MvcOptions(); 51var options = new MvcOptions(); 69var options = new MvcOptions(); 86var options = new MvcOptions(); 103var options = new MvcOptions(); 121var options = new MvcOptions(); 138var options = new MvcOptions(); 156var options = new MvcOptions(); 178var options = new MvcOptions { MaxIAsyncEnumerableBufferLimit = 10 }; 194var options = new MvcOptions(); 207var options = new MvcOptions();
Infrastructure\ControllerActionInvokerCacheTest.cs (1)
96var mvcOptions = Options.Create(new MvcOptions());
Infrastructure\ControllerActionInvokerProviderTest.cs (2)
25var provider = CreateInvokerProvider(new MvcOptions() { MaxValidationDepth = 1, MaxModelBindingRecursionDepth = 2, MaxModelValidationErrors = 3 }); 67mvcOptions ??= new MvcOptions();
Infrastructure\ControllerActionInvokerTest.cs (1)
1705var options = Options.Create(new MvcOptions());
Infrastructure\DefaultApiProblemDetailsWriterTest.cs (1)
229var mvcOptions = Options.Create(new MvcOptions());
Infrastructure\DefaultOutputFormatterSelectorTest.cs (2)
239var options = new MvcOptions() 365var options = new MvcOptions();
Infrastructure\ObjectResultExecutorTest.cs (4)
283var options = new MvcOptions(); 376var options = new MvcOptions(); 413var options = new MvcOptions(); 479options ??= new MvcOptions();
ModelBinding\Binders\BodyModelBinderProviderTest.cs (3)
89var options = new MvcOptions { AllowEmptyInputInBodyModelBinding = true }; 112var allowEmpty = BodyModelBinderProvider.CalculateAllowEmptyBody(EmptyBodyBehavior.Allow, options: new MvcOptions()); 123var options = new MvcOptions { AllowEmptyInputInBodyModelBinding = true };
ModelBinding\Binders\BodyModelBinderTests.cs (17)
265var binder = CreateBinder(new[] { formatter }, new MvcOptions()); 288{ new XmlSerializerInputFormatter(new MvcOptions()) }, 289{ new XmlDataContractSerializerInputFormatter(new MvcOptions()) }, 308var binder = CreateBinder(new[] { formatter }, new MvcOptions()); 339new MvcOptions()); 379var binder = CreateBinder(new[] { formatter }, new MvcOptions()); 410new MvcOptions()); 455var binder = CreateBinder(new[] { formatter }, new MvcOptions()); 490var binder = CreateBinder(new[] { formatter }, new MvcOptions()); 523var binder = CreateBinder(new[] { formatter }, new MvcOptions()); 709var options = new MvcOptions(); 772: base(GetLogger(), new JsonSerializerSettings(), ArrayPool<char>.Shared, new DefaultObjectPoolProvider(), new MvcOptions(), new MvcNewtonsoftJsonOptions() 798: base(new MvcOptions()) 820: base(new MvcOptions()) 842: base(GetLogger(), new JsonSerializerSettings(), ArrayPool<char>.Shared, new DefaultObjectPoolProvider(), new MvcOptions(), new MvcNewtonsoftJsonOptions() 868: base(new MvcOptions()) 890: base(new MvcOptions())
ModelBinding\Binders\ComplexObjectModelBinderTest.cs (1)
1086var options = Options.Create(new MvcOptions());
ModelBinding\Binders\ComplexTypeModelBinderTest.cs (1)
1248var options = Options.Create(new MvcOptions());
ModelBinding\Binders\EnumTypeModelBinderProviderTest.cs (3)
16var provider = new EnumTypeModelBinderProvider(new MvcOptions()); 32var provider = new EnumTypeModelBinderProvider(new MvcOptions()); 49var provider = new EnumTypeModelBinderProvider(new MvcOptions());
ModelBinding\Binders\EnumTypeModelBinderTest.cs (1)
252var binderProvider = new EnumTypeModelBinderProvider(new MvcOptions());
ModelBinding\Binders\HeaderModelBinderTests.cs (1)
337var options = new MvcOptions();
ModelBinding\Metadata\DefaultModelMetadataProviderTest.cs (1)
435Options.Create(new MvcOptions()));
ModelBinding\ModelBinderFactoryTest.cs (13)
23var options = Options.Create(new MvcOptions()); 43var options = Options.Create(new MvcOptions()); 69var options = Options.Create(new MvcOptions()); 109var options = Options.Create(new MvcOptions()); 144var options = Options.Create(new MvcOptions()); 185var options = Options.Create(new MvcOptions()); 223var options = Options.Create(new MvcOptions()); 254var options = Options.Create(new MvcOptions()); 369var options = Options.Create(new MvcOptions()); 395var options = Options.Create(new MvcOptions()); 456var options = Options.Create(new MvcOptions()); 520var options = Options.Create(new MvcOptions()); 582var options = Options.Create(new MvcOptions());
ModelBinding\ModelBindingHelperTest.cs (7)
80new DefaultObjectValidator(metadataProvider, new[] { validator }, new MvcOptions())); 120new DefaultObjectValidator(metadataProvider, new[] { validator }, new MvcOptions())); 198new DefaultObjectValidator(metadataProvider, new[] { validator }, new MvcOptions()), 274new DefaultObjectValidator(metadataProvider, new[] { validator }, new MvcOptions()), 325new DefaultObjectValidator(metadataProvider, new[] { validator }, new MvcOptions())); 529new DefaultObjectValidator(metadataProvider, new[] { validator }, new MvcOptions()), 597new DefaultObjectValidator(metadataProvider, new[] { validator }, new MvcOptions()));
ModelBinding\ParameterBinderTest.cs (9)
26private static readonly IOptions<MvcOptions> _optionsAccessor = Options.Create(new MvcOptions()); 327new MvcOptions()), 382new MvcOptions()), 437new MvcOptions()), 491new MvcOptions()), 550new MvcOptions()), 612new MvcOptions()), 679new MvcOptions()), 759new MvcOptions()),
ModelBinding\TestModelBinderProviderContext.cs (1)
102var mvcOptions = new MvcOptions();
ModelBinding\Validation\DefaultObjectValidatorTests.cs (3)
17private readonly MvcOptions _options = new MvcOptions(); 1196var options = new MvcOptions(); 1471return new DefaultObjectValidator(metadataProvider, validatorProviders, new MvcOptions());
MvcOptionsTest.cs (1)
12var options = new MvcOptions();
ObjectResultTests.cs (1)
159var options = Options.Create(new MvcOptions());
RequireHttpsAttributeTests.cs (2)
168var options = Options.Create(new MvcOptions()); 235var options = Options.Create(new MvcOptions());
ResponseCacheAttributeTest.cs (1)
326var optionsAccessor = Options.Create(new MvcOptions());
Microsoft.AspNetCore.Mvc.Core.TestCommon (9)
TestModelBinderFactory.cs (2)
36var options = Options.Create(new MvcOptions()); 58var options = Options.Create(new MvcOptions());
TestModelMetadataProvider.cs (7)
21return new DataAnnotationsMetadataProvider(new MvcOptions(), localizationOptions, stringLocalizerFactory); 41return new DefaultModelMetadataProvider(compositeDetailsProvider, Options.Create(new MvcOptions())); 51new MvcOptions(), 65return new DefaultModelMetadataProvider(compositeDetailsProvider, Options.Create(new MvcOptions())); 77return new DefaultModelMetadataProvider(compositeDetailsProvider, Options.Create(new MvcOptions())); 94new MvcOptions(), 99Options.Create(new MvcOptions()))
Microsoft.AspNetCore.Mvc.Cors.Test (2)
CorsApplicationModelProviderTest.cs (2)
20private readonly IOptions<MvcOptions> OptionsWithoutEndpointRouting = Options.Create(new MvcOptions { EnableEndpointRouting = false }); 215Options.Create(new MvcOptions()),
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (4)
DataAnnotationsMetadataProviderTest.cs (2)
1198var provider = CreateProvider(options: new MvcOptions() 1701options ?? new MvcOptions(),
ModelMetadataProviderTest.cs (2)
1050new MvcOptions(), 1054Options.Create(new MvcOptions()))
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (57)
DependencyInjection\XmlDataContractSerializerMvcOptionsSetupTest.cs (4)
17var options = new MvcOptions(); 32var options = new MvcOptions(); 48var options = new MvcOptions(); 62var options = new MvcOptions();
DependencyInjection\XmlSerializerMvcOptionsSetupTest.cs (4)
17var options = new MvcOptions(); 32var options = new MvcOptions(); 48var options = new MvcOptions(); 62var options = new MvcOptions();
XmlDataContractSerializerInputFormatterTest.cs (25)
70var formatter = new XmlDataContractSerializerInputFormatter(new MvcOptions()); 113var formatter = new XmlDataContractSerializerInputFormatter(new MvcOptions()); 126var formatter = new XmlDataContractSerializerInputFormatter(new MvcOptions()); 144var formatter = new XmlDataContractSerializerInputFormatter(new MvcOptions()); 176var formatter = new XmlDataContractSerializerInputFormatter(new MvcOptions()); 208var formatter = new XmlDataContractSerializerInputFormatter(new MvcOptions { SuppressInputFormatterBuffering = true }); 243var formatter = new XmlDataContractSerializerInputFormatter(new MvcOptions()); 276new MvcOptions() { SuppressInputFormatterBuffering = true }); 307var formatter = new XmlDataContractSerializerInputFormatter(new MvcOptions()); 334var mvcOptions = new MvcOptions() { SuppressInputFormatterBuffering = false }; 373var formatter = new XmlDataContractSerializerInputFormatter(new MvcOptions()); 398var formatter = new XmlDataContractSerializerInputFormatter(new MvcOptions()); 420var formatter = new XmlDataContractSerializerInputFormatter(new MvcOptions()); 436var formatter = new XmlDataContractSerializerInputFormatter(new MvcOptions()); 449var formatter = new XmlDataContractSerializerInputFormatter(new MvcOptions()); 461var formatter = new XmlDataContractSerializerInputFormatter(new MvcOptions()); 490var formatter = new XmlDataContractSerializerInputFormatter(new MvcOptions()); 508var formatter = new XmlDataContractSerializerInputFormatter(new MvcOptions()); 545var formatter = new XmlDataContractSerializerInputFormatter(new MvcOptions()); 571var formatter = new XmlDataContractSerializerInputFormatter(new MvcOptions()); 610var formatter = new XmlDataContractSerializerInputFormatter(new MvcOptions()); 639var formatter = new XmlDataContractSerializerInputFormatter(new MvcOptions()) 669var formatter = new XmlDataContractSerializerInputFormatter(new MvcOptions()); 698var formatter = new XmlDataContractSerializerInputFormatter(new MvcOptions()) 758: base(new MvcOptions())
XmlDataContractSerializerOutputFormatterTest.cs (1)
808.AddSingleton(Options.Create(new MvcOptions()))
XmlSerializerInputFormatterTest.cs (22)
49var formatter = new XmlSerializerInputFormatter(new MvcOptions()); 86var formatter = new XmlSerializerInputFormatter(new MvcOptions { SuppressInputFormatterBuffering = true }); 123var formatter = new XmlSerializerInputFormatter(new MvcOptions()); 159var formatter = new XmlSerializerInputFormatter(new MvcOptions() { SuppressInputFormatterBuffering = true }); 198var mvcOptions = new MvcOptions(); 248var formatter = new XmlSerializerInputFormatter(new MvcOptions()); 276var formatter = new XmlSerializerInputFormatter(new MvcOptions()); 310var formatter = new XmlSerializerInputFormatter(new MvcOptions()); 323var formatter = new XmlSerializerInputFormatter(new MvcOptions()); 343var formatter = new XmlSerializerInputFormatter(new MvcOptions()); 377var formatter = new XmlSerializerInputFormatter(new MvcOptions()); 405var formatter = new XmlSerializerInputFormatter(new MvcOptions()); 432var formatter = new XmlSerializerInputFormatter(new MvcOptions()); 453var formatter = new XmlSerializerInputFormatter(new MvcOptions()); 466var formatter = new XmlSerializerInputFormatter(new MvcOptions()); 478var formatter = new XmlSerializerInputFormatter(new MvcOptions()); 510var formatter = new XmlSerializerInputFormatter(new MvcOptions()); 529var formatter = new XmlSerializerInputFormatter(new MvcOptions()); 565var formatter = new XmlSerializerInputFormatter(new MvcOptions()); 593var formatter = new XmlSerializerInputFormatter(new MvcOptions()); 631var formatter = new XmlSerializerInputFormatter(new MvcOptions()); 693: base(new MvcOptions())
XmlSerializerOutputFormatterTest.cs (1)
590.AddSingleton(Options.Create(new MvcOptions()))
Microsoft.AspNetCore.Mvc.IntegrationTests (7)
AuthorizeFilterIntegrationTest.cs (1)
169Options.Create(new MvcOptions()),
BindingSourceMetadataProviderIntegrationTest.cs (2)
19var options = new MvcOptions(); 73var options = new MvcOptions();
ExcludeBindingMetadataProviderIntegrationTest.cs (2)
18var options = new MvcOptions(); 64var options = new MvcOptions();
ModelBindingTestHelper.cs (1)
131options?.Value ?? new MvcOptions());
TestMvcOptions.cs (1)
19Value = new MvcOptions();
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (36)
JsonResultTest.cs (1)
47Options.Create(new MvcOptions()),
NewtonsoftJsonInputFormatterTest.cs (12)
34new MvcOptions(), 61var mvcOptions = new MvcOptions() 97var mvcOptions = new MvcOptions() 319new MvcOptions(), 354new MvcOptions(), 385new MvcOptions(), 416new MvcOptions(), 445new MvcOptions(), 493new MvcOptions(), 541new MvcOptions(), 566: base(GetLogger(), settings, ArrayPool<char>.Shared, objectPoolProvider, new MvcOptions(), new MvcNewtonsoftJsonOptions()) 590new MvcOptions(),
NewtonsoftJsonOutputFormatterTest.cs (7)
22return new NewtonsoftJsonOutputFormatter(new JsonSerializerSettings(), ArrayPool<char>.Shared, new MvcOptions(), new MvcNewtonsoftJsonOptions()); 76var jsonFormatter = new NewtonsoftJsonOutputFormatter(settings, ArrayPool<char>.Shared, new MvcOptions()); 106var jsonFormatter = new NewtonsoftJsonOutputFormatter(settings, ArrayPool<char>.Shared, new MvcOptions(), new MvcNewtonsoftJsonOptions() 133var jsonFormatter = new NewtonsoftJsonOutputFormatter(settings, ArrayPool<char>.Shared, new MvcOptions(), new MvcNewtonsoftJsonOptions()); 351var formatter = new NewtonsoftJsonOutputFormatter(new JsonSerializerSettings(), ArrayPool<char>.Shared, new MvcOptions(), new MvcNewtonsoftJsonOptions()); 382var formatter = new NewtonsoftJsonOutputFormatter(new JsonSerializerSettings(), ArrayPool<char>.Shared, new MvcOptions(), new MvcNewtonsoftJsonOptions()); 555: base(serializerSettings, ArrayPool<char>.Shared, new MvcOptions(), new MvcNewtonsoftJsonOptions())
NewtonsoftJsonPatchInputFormatterTest.cs (3)
32new MvcOptions(), 60var mvcOptions = new MvcOptions() 234new MvcOptions(),
NewtonsoftJsonResultExecutorTest.cs (1)
21Options.Create(new MvcOptions()),
src\Mvc\Mvc.Core\test\Infrastructure\AsyncEnumerableReaderTest.cs (12)
18var options = new MvcOptions(); 33var options = new MvcOptions(); 51var options = new MvcOptions(); 69var options = new MvcOptions(); 86var options = new MvcOptions(); 103var options = new MvcOptions(); 121var options = new MvcOptions(); 138var options = new MvcOptions(); 156var options = new MvcOptions(); 178var options = new MvcOptions { MaxIAsyncEnumerableBufferLimit = 10 }; 194var options = new MvcOptions(); 207var options = new MvcOptions();
Microsoft.AspNetCore.Mvc.RazorPages.Test (18)
ApplicationModels\AuthorizationPageApplicationModelProviderTest.cs (2)
17private readonly IOptions<MvcOptions> OptionsWithoutEndpointRouting = Options.Create(new MvcOptions { EnableEndpointRouting = false }); 58var authorizationProvider = new AuthorizationPageApplicationModelProvider(policyProvider, Options.Create(new MvcOptions()));
ApplicationModels\ResponseCacheFilterApplicationModelProviderTest.cs (3)
22var options = Options.Create(new MvcOptions()); 56var options = Options.Create(new MvcOptions()); 98var options = Options.Create(new MvcOptions());
DependencyInjection\PageConventionCollectionExtensionsTest.cs (1)
978var options = new MvcOptions { EnableEndpointRouting = enableEndpointRouting };
Infrastructure\DefaultPageLoaderTest.cs (6)
37var mvcOptions = Options.Create(new MvcOptions()); 120var mvcOptions = Options.Create(new MvcOptions()); 160var mvcOptions = Options.Create(new MvcOptions()); 237var mvcOptions = Options.Create(new MvcOptions()); 299var mvcOptions = Options.Create(new MvcOptions()); 336var mvcOptions = Options.Create(new MvcOptions());
Infrastructure\PageActionInvokerProviderTest.cs (3)
257mvcOptions: new MvcOptions { EnableEndpointRouting = true }); 291mvcOptions: new MvcOptions { EnableEndpointRouting = false }); 506mvcOptions = mvcOptions ?? new MvcOptions();
Infrastructure\PageBinderFactoryTest.cs (3)
20private static readonly MvcOptions _options = new MvcOptions(); 548new MvcOptions()), 672new MvcOptions()),
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (9)
ControllerTest.cs (1)
455ObjectValidator = new DefaultObjectValidator(metadataProvider, validatorProviders, new MvcOptions()),
Filters\AntiforgeryApplicationModelProviderTest.cs (6)
18Options.Create(new MvcOptions()), 52Options.Create(new MvcOptions()), 79Options.Create(new MvcOptions()), 103Options.Create(new MvcOptions()), 131Options.Create(new MvcOptions()), 145Options.Create(new MvcOptions()),
Filters\TempDataApplicationModelProviderTest.cs (1)
115Options.Create(new MvcOptions()),
Filters\ViewDataAttributeApplicationModelProviderTest.cs (1)
68Options.Create(new MvcOptions()),
Microsoft.AspNetCore.OpenApi.Tests (1)
Services\OpenApiDocumentServiceTestsBase.cs (1)
59var options = new MvcOptions
441 references to MvcOptions
BasicWebSite (3)
Controllers\ContentNegotiation\FallbackOnTypeBasedMatchController.cs (3)
13private readonly IOptions<MvcOptions> _mvcOptions; 16public FallbackOnTypeBasedMatchController(IOptions<MvcOptions> mvcOptions) 73[FromServices] IOptions<MvcOptions> optionsAccessor)
CorsWebSite (2)
Startup.cs (1)
81protected virtual void ConfigureMvcOptions(MvcOptions options)
StartupWithoutEndpointRouting.cs (1)
15protected override void ConfigureMvcOptions(MvcOptions options)
HtmlGenerationWebSite (2)
Startup.cs (1)
64protected virtual void ConfigureMvcOptions(MvcOptions options)
StartupWithoutEndpointRouting.cs (1)
31protected override void ConfigureMvcOptions(MvcOptions options)
Microsoft.AspNetCore.Mvc (7)
MvcServiceCollectionExtensions.cs (7)
43/// <param name="setupAction">An <see cref="Action{MvcOptions}"/> to configure the provided <see cref="MvcOptions"/>.</param> 46public static IMvcBuilder AddMvc(this IServiceCollection services, Action<MvcOptions> setupAction) 96/// <param name="configure">An <see cref="Action{MvcOptions}"/> to configure the provided <see cref="MvcOptions"/>.</param> 118public static IMvcBuilder AddControllers(this IServiceCollection services, Action<MvcOptions>? configure) 189/// <param name="configure">An <see cref="Action{MvcOptions}"/> to configure the provided <see cref="MvcOptions"/>.</param> 209public static IMvcBuilder AddControllersWithViews(this IServiceCollection services, Action<MvcOptions>? configure) 269/// <param name="configure">An <see cref="Action{MvcOptions}"/> to configure the provided <see cref="MvcOptions"/>.</param>
Microsoft.AspNetCore.Mvc.Abstractions.Test (2)
ModelBinding\ModelStateDictionaryTest.cs (2)
1761private class OptionsAccessor : IOptions<MvcOptions> 1763public MvcOptions Value { get; } = new MvcOptions();
Microsoft.AspNetCore.Mvc.ApiExplorer (6)
ApiResponseTypeProvider.cs (2)
18private readonly MvcOptions _mvcOptions; 23MvcOptions mvcOptions)
DefaultApiDescriptionProvider.cs (4)
28private readonly MvcOptions _mvcOptions; 37/// <param name="optionsAccessor">The accessor for <see cref="MvcOptions"/>.</param> 45IOptions<MvcOptions> optionsAccessor, 297internal static void ProcessIsRequired(ApiParameterContext context, MvcOptions mvcOptions)
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (2)
ApiResponseTypeProviderTest.cs (1)
769var mvcOptions = new MvcOptions
DefaultApiDescriptionProviderTest.cs (1)
2227var options = new MvcOptions();
Microsoft.AspNetCore.Mvc.Core (116)
ApplicationModels\ApplicationModelFactory.cs (1)
24IOptions<MvcOptions> options)
ApplicationModels\AuthorizationApplicationModelProvider.cs (2)
13private readonly MvcOptions _mvcOptions; 18IOptions<MvcOptions> mvcOptions)
ApplicationModels\DefaultApplicationModelProvider.cs (2)
22private readonly MvcOptions _mvcOptions; 28IOptions<MvcOptions> mvcOptionsAccessor,
ApplicationModels\IApplicationModelConvention.cs (1)
10/// Implementations of this interface can be registered in <see cref="MvcOptions.Conventions"/>
Builder\MvcApplicationBuilderExtensions.cs (1)
68var options = app.ApplicationServices.GetRequiredService<IOptions<MvcOptions>>();
CompatibilityVersion.cs (8)
9/// Specifies the version compatibility of runtime behaviors configured by <see cref="MvcOptions"/>. 46/// Sets the default value of settings on <see cref="MvcOptions"/> to match the behavior of 53/// Sets the default value of settings on <see cref="MvcOptions"/> to match the behavior of 64/// Sets the default value of settings on <see cref="MvcOptions"/> to match the behavior of 71/// <item><description><see cref="MvcOptions.EnableEndpointRouting" /></description></item> 72/// <item><description><see cref="MvcOptions.MaxValidationDepth" /></description></item> 80/// Sets the default value of settings on <see cref="MvcOptions"/> and other <c>Options</c> types to match 87/// Sets the default value of settings on <see cref="MvcOptions"/> to match the latest release. Use this
Controllers\ControllerBinderDelegateProvider.cs (1)
19MvcOptions mvcOptions)
DependencyInjection\ApplicationModelConventionExtensions.cs (5)
10/// Contains the extension methods for <see cref="AspNetCore.Mvc.MvcOptions.Conventions"/>. 51/// in <see cref="AspNetCore.Mvc.MvcOptions"/>.</param> 68/// in <see cref="AspNetCore.Mvc.MvcOptions"/>.</param> 85/// in <see cref="AspNetCore.Mvc.MvcOptions"/>.</param> 102/// in <see cref="AspNetCore.Mvc.MvcOptions"/>.</param>
DependencyInjection\MvcCoreMvcBuilderExtensions.cs (3)
21/// Registers an action to configure <see cref="MvcOptions"/>. 28Action<MvcOptions> setupAction) 68builder.Services.Configure<MvcOptions>((options) => setupAction(options.FormatterMappings));
DependencyInjection\MvcCoreMvcCoreBuilderExtensions.cs (3)
23/// Registers an action to configure <see cref="MvcOptions"/>. 30Action<MvcOptions> setupAction) 81builder.Services.Configure<MvcOptions>((options) => setupAction(options.FormatterMappings));
DependencyInjection\MvcCoreServiceCollectionExtensions.cs (8)
104/// <param name="setupAction">An <see cref="Action{MvcOptions}"/> to configure the provided <see cref="MvcOptions"/>.</param> 117Action<MvcOptions> setupAction) 135ServiceDescriptor.Transient<IConfigureOptions<MvcOptions>, MvcCoreMvcOptionsSetup>()); 137ServiceDescriptor.Transient<IPostConfigureOptions<MvcOptions>, MvcCoreMvcOptionsSetup>()); 211var options = s.GetRequiredService<IOptions<MvcOptions>>().Value; 217var options = s.GetRequiredService<IOptions<MvcOptions>>().Value;
Formatters\FormatFilter.cs (2)
19private readonly MvcOptions _options; 27public FormatFilter(IOptions<MvcOptions> options, ILoggerFactory loggerFactory)
FromBodyAttribute.cs (1)
51/// The default behavior is to use framework defaults as configured by <see cref="MvcOptions.AllowEmptyInputInBodyModelBinding"/>.
Infrastructure\AsyncEnumerableReader.cs (3)
35private readonly MvcOptions _mvcOptions; 40/// <param name="mvcOptions">Accessor to <see cref="MvcOptions"/>.</param> 41public AsyncEnumerableReader(MvcOptions mvcOptions)
Infrastructure\ControllerActionInvokerCache.cs (2)
22private readonly MvcOptions _mvcOptions; 30IOptions<MvcOptions> mvcOptions)
Infrastructure\ControllerActionInvokerProvider.cs (2)
30IOptions<MvcOptions> optionsAccessor, 40IOptions<MvcOptions> optionsAccessor,
Infrastructure\DefaultOutputFormatterSelector.cs (4)
35/// <param name="options">Used to access <see cref="MvcOptions"/>.</param> 37public DefaultOutputFormatterSelector(IOptions<MvcOptions> options, ILoggerFactory loggerFactory) 64typeof(MvcOptions).FullName, 65nameof(MvcOptions.OutputFormatters),
Infrastructure\MvcCoreMvcOptionsSetup.cs (5)
21/// Sets up default options for <see cref="MvcOptions"/>. 23internal sealed class MvcCoreMvcOptionsSetup : IConfigureOptions<MvcOptions>, IPostConfigureOptions<MvcOptions> 45public void Configure(MvcOptions options) 98public void PostConfigure(string? name, MvcOptions options)
Infrastructure\ObjectResultExecutor.cs (2)
26/// <param name="mvcOptions">Accessor to <see cref="MvcOptions"/>.</param> 31IOptions<MvcOptions> mvcOptions)
Infrastructure\OutputFormatterSelector.cs (5)
19/// The default implementation is controlled by settings on <see cref="MvcOptions"/>, most notably: 20/// <see cref="MvcOptions.OutputFormatters"/>, <see cref="MvcOptions.RespectBrowserAcceptHeader"/>, and 21/// <see cref="MvcOptions.ReturnHttpNotAcceptable"/>. 30/// <param name="formatters">A list of formatters to use; this acts as an override to <see cref="MvcOptions.OutputFormatters"/>.</param>
JsonOptions.cs (1)
40MaxDepth = MvcOptions.DefaultMaxModelBindingRecursionDepth,
ModelBinding\Binders\ArrayModelBinder.cs (2)
67/// <param name="mvcOptions">The <see cref="MvcOptions"/>.</param> 80MvcOptions mvcOptions)
ModelBinding\Binders\ArrayModelBinderProvider.cs (2)
29var mvcOptions = context.Services.GetRequiredService<IOptions<MvcOptions>>().Value;
ModelBinding\Binders\BodyModelBinder.cs (3)
25private readonly MvcOptions? _options; 66/// <param name="options">The <see cref="MvcOptions"/>.</param> 71MvcOptions? options)
ModelBinding\Binders\BodyModelBinderProvider.cs (6)
22private readonly MvcOptions? _options; 51/// <param name="options">The <see cref="MvcOptions"/>.</param> 56MvcOptions? options) 78typeof(MvcOptions).FullName, 79nameof(MvcOptions.InputFormatters), 94internal static bool CalculateAllowEmptyBody(EmptyBodyBehavior emptyBodyBehavior, MvcOptions? options)
ModelBinding\Binders\CollectionModelBinder.cs (5)
25private readonly int _maxModelBindingCollectionSize = MvcOptions.DefaultMaxModelBindingCollectionSize; 77/// <param name="mvcOptions">The <see cref="MvcOptions"/>.</param> 83MvcOptions mvcOptions) 391nameof(MvcOptions), 392nameof(MvcOptions.MaxModelBindingCollectionSize),
ModelBinding\Binders\CollectionModelBinderProvider.cs (2)
61var mvcOptions = context.Services.GetRequiredService<IOptions<MvcOptions>>().Value;
ModelBinding\Binders\DictionaryModelBinder.cs (2)
81/// <param name="mvcOptions">The <see cref="MvcOptions"/>.</param> 97MvcOptions mvcOptions)
ModelBinding\Binders\DictionaryModelBinderProvider.cs (2)
36var mvcOptions = context.Services.GetRequiredService<IOptions<MvcOptions>>().Value;
ModelBinding\Binders\EnumTypeModelBinderProvider.cs (2)
19/// <param name="options">The <see cref="MvcOptions"/>.</param> 21public EnumTypeModelBinderProvider(MvcOptions options)
ModelBinding\DefaultModelBindingContext.cs (4)
175_maxModelBindingRecursionDepth = MvcOptions.DefaultMaxModelBindingRecursionDepth; 235var mvcOptions = actionContext.HttpContext.RequestServices?.GetService<IOptions<MvcOptions>>(); 291nameof(MvcOptions), 292nameof(MvcOptions.MaxModelBindingRecursionDepth),
ModelBinding\EmptyModelMetadataProvider.cs (2)
26private sealed class OptionsAccessor : IOptions<MvcOptions> 28public MvcOptions Value { get; } = new MvcOptions();
ModelBinding\Metadata\DefaultModelMetadataProvider.cs (4)
37/// <param name="optionsAccessor">The accessor for <see cref="MvcOptions"/>.</param> 40IOptions<MvcOptions> optionsAccessor) 66/// <value>Same as <see cref="MvcOptions.ModelBindingMessageProvider"/> in all production scenarios.</value> 143private static DefaultModelBindingMessageProvider GetMessageProvider(IOptions<MvcOptions> optionsAccessor)
ModelBinding\ModelBinderFactory.cs (4)
33/// <param name="options">The <see cref="IOptions{TOptions}"/> for <see cref="MvcOptions"/>.</param> 37IOptions<MvcOptions> options, 58typeof(MvcOptions).FullName, 59nameof(MvcOptions.ModelBinderProviders),
ModelBinding\ParameterBinder.cs (2)
27/// <param name="mvcOptions">The <see cref="MvcOptions"/> accessor.</param> 34IOptions<MvcOptions> mvcOptions,
ModelBinding\Validation\DefaultObjectValidator.cs (3)
15private readonly MvcOptions _mvcOptions; 22/// <param name="mvcOptions">Accessor to <see cref="MvcOptions"/>.</param> 26MvcOptions mvcOptions)
ModelBinding\Validation\IMetadataBasedModelValidatorProvider.cs (1)
16/// can be calculated if all instances in <see cref="MvcOptions.ModelValidatorProviders"/> are <see cref="IMetadataBasedModelValidatorProvider" />.
ModelBinding\Validation\ValidationVisitor.cs (2)
311message += " " + Resources.FormatValidationVisitor_ExceededMaxDepthFix(nameof(MvcOptions), nameof(MvcOptions.MaxValidationDepth));
MvcOptions.cs (1)
36/// Creates a new instance of <see cref="MvcOptions"/>.
RequireHttpsAttribute.cs (1)
72var optionsAccessor = filterContext.HttpContext.RequestServices.GetRequiredService<IOptions<MvcOptions>>();
ResponseCacheAttribute.cs (2)
84public CacheProfile GetCacheProfile(MvcOptions options) 123var optionsAccessor = serviceProvider.GetRequiredService<IOptions<MvcOptions>>();
Routing\ControllerRequestDelegateFactory.cs (2)
32IOptions<MvcOptions> optionsAccessor, 42IOptions<MvcOptions> optionsAccessor,
Microsoft.AspNetCore.Mvc.Core.Test (65)
ApplicationModels\AuthorizationApplicationModelProviderTest.cs (1)
16private readonly IOptions<MvcOptions> OptionsWithoutEndpointRouting = Options.Create(new MvcOptions { EnableEndpointRouting = false });
ApplicationModels\DefaultApplicationModelProviderTest.cs (7)
24var options = new MvcOptions() 258var options = new MvcOptions(); 286var options = new MvcOptions(); 314var options = new MvcOptions(); 334var options = new MvcOptions { SuppressAsyncSuffixInActionNames = false }; 354var options = new MvcOptions(); 1873MvcOptions options,
Controllers\ControllerBinderDelegateProviderTest.cs (2)
25private static readonly MvcOptions _options = new MvcOptions(); 26private static readonly IOptions<MvcOptions> _optionsAccessor = Options.Create(_options);
DependencyInjection\ApplicationModelConventionExtensionsTest.cs (4)
28var options = new MvcOptions(); 68var options = new MvcOptions(); 126var options = new MvcOptions(); 151var options = new MvcOptions();
DependencyInjection\MvcCoreServiceCollectionExtensionsTest.cs (2)
235typeof(IConfigureOptions<MvcOptions>), 242typeof(IPostConfigureOptions<MvcOptions>),
Filters\MiddlewareFilterTest.cs (2)
264var options = new MvcOptions(); 265var optionsAccessor = new Mock<IOptions<MvcOptions>>();
Formatters\FormatFilterTest.cs (2)
392public MvcOptions MvcOptions { get; private set; } 396public IOptions<MvcOptions> OptionsManager { get; private set; }
Infrastructure\AsyncEnumerableReaderTest.cs (12)
18var options = new MvcOptions(); 33var options = new MvcOptions(); 51var options = new MvcOptions(); 69var options = new MvcOptions(); 86var options = new MvcOptions(); 103var options = new MvcOptions(); 121var options = new MvcOptions(); 138var options = new MvcOptions(); 156var options = new MvcOptions(); 178var options = new MvcOptions { MaxIAsyncEnumerableBufferLimit = 10 }; 194var options = new MvcOptions(); 207var options = new MvcOptions();
Infrastructure\ControllerActionInvokerProviderTest.cs (1)
63private static ControllerActionInvokerProvider CreateInvokerProvider(MvcOptions mvcOptions = null)
Infrastructure\ControllerActionInvokerTest.cs (1)
1709services.AddSingleton<IOptions<MvcOptions>>(options);
Infrastructure\DefaultOutputFormatterSelectorTest.cs (3)
239var options = new MvcOptions() 365var options = new MvcOptions(); 374private static DefaultOutputFormatterSelector CreateSelector(MvcOptions options)
Infrastructure\ObjectResultExecutorTest.cs (6)
283var options = new MvcOptions(); 308var expected = $"'{typeof(MvcOptions).FullName}.{nameof(MvcOptions.OutputFormatters)}' must not be " + 376var options = new MvcOptions(); 413var options = new MvcOptions(); 477private static ObjectResultExecutor CreateExecutor(MvcOptions options = null)
ModelBinding\Binders\BodyModelBinderProviderTest.cs (4)
45var expected = $"'{typeof(MvcOptions).FullName}.{nameof(MvcOptions.InputFormatters)}' must not be empty. " + 89var options = new MvcOptions { AllowEmptyInputInBodyModelBinding = true }; 123var options = new MvcOptions { AllowEmptyInputInBodyModelBinding = true };
ModelBinding\Binders\BodyModelBinderTests.cs (2)
709var options = new MvcOptions(); 716private static BodyModelBinder CreateBinder(IList<IInputFormatter> formatters, MvcOptions mvcOptions)
ModelBinding\Binders\ComplexObjectModelBinderTest.cs (1)
1084private static ComplexObjectModelBinder CreateBinder(ModelMetadata metadata, Action<MvcOptions> configureOptions = null)
ModelBinding\Binders\HeaderModelBinderProviderTest.cs (2)
181var options = context.Services.GetRequiredService<IOptions<MvcOptions>>().Value;
ModelBinding\Binders\HeaderModelBinderTests.cs (1)
337var options = new MvcOptions();
ModelBinding\ModelBinderFactoryTest.cs (2)
20var expected = $"'{typeof(MvcOptions).FullName}.{nameof(MvcOptions.ModelBinderProviders)}' must not be " +
ModelBinding\ParameterBinderTest.cs (2)
26private static readonly IOptions<MvcOptions> _optionsAccessor = Options.Create(new MvcOptions()); 743IOptions<MvcOptions> optionsAccessor = null,
ModelBinding\TestModelBinderProviderContext.cs (3)
61public MvcOptions MvcOptions { get; } 97private static (IServiceProvider, MvcOptions) GetServicesAndOptions() 102var mvcOptions = new MvcOptions();
ModelBinding\Validation\DefaultObjectValidatorTests.cs (2)
17private readonly MvcOptions _options = new MvcOptions(); 1196var options = new MvcOptions();
MvcOptionsTest.cs (1)
12var options = new MvcOptions();
RequireHttpsAttributeTests.cs (1)
240services.AddSingleton<IOptions<MvcOptions>>(options);
ResponseCacheAttributeTest.cs (1)
336.Setup(s => s.GetService(typeof(IOptions<MvcOptions>)))
Microsoft.AspNetCore.Mvc.Core.TestCommon (4)
TestModelBinderFactory.cs (4)
15var options = serviceProvider.GetRequiredService<IOptions<MvcOptions>>(); 67protected TestModelBinderFactory(IModelMetadataProvider metadataProvider, IOptions<MvcOptions> options) 74IOptions<MvcOptions> options, 80private static IServiceProvider GetServices(IOptions<MvcOptions> options)
Microsoft.AspNetCore.Mvc.Cors (2)
CorsApplicationModelProvider.cs (2)
14private readonly MvcOptions _mvcOptions; 16public CorsApplicationModelProvider(IOptions<MvcOptions> mvcOptions)
Microsoft.AspNetCore.Mvc.Cors.Test (1)
CorsApplicationModelProviderTest.cs (1)
20private readonly IOptions<MvcOptions> OptionsWithoutEndpointRouting = Options.Create(new MvcOptions { EnableEndpointRouting = false });
Microsoft.AspNetCore.Mvc.DataAnnotations (6)
DataAnnotationsMetadataProvider.cs (2)
25private readonly MvcOptions _options; 29MvcOptions options,
DependencyInjection\MvcDataAnnotationsMvcCoreBuilderExtensions.cs (1)
62ServiceDescriptor.Transient<IConfigureOptions<MvcOptions>, MvcDataAnnotationsMvcOptionsSetup>());
DependencyInjection\MvcDataAnnotationsMvcOptionsSetup.cs (3)
12/// Sets up default options for <see cref="MvcOptions"/>. 14internal sealed class MvcDataAnnotationsMvcOptionsSetup : IConfigureOptions<MvcOptions> 40public void Configure(MvcOptions options)
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (3)
DataAnnotationsMetadataProviderTest.cs (1)
1696MvcOptions options = null,
MvcDataAnnotationsMvcOptionsSetup.cs (2)
23services.AddSingleton<IConfigureOptions<MvcOptions>, MvcDataAnnotationsMvcOptionsSetup>(); 28var optionsSetup = serviceProvider.GetRequiredService<IConfigureOptions<MvcOptions>>();
Microsoft.AspNetCore.Mvc.Formatters.Xml (24)
DependencyInjection\MvcXmlMvcBuilderExtensions.cs (2)
97ServiceDescriptor.Transient<IConfigureOptions<MvcOptions>, XmlDataContractSerializerMvcOptionsSetup>()); 104ServiceDescriptor.Transient<IConfigureOptions<MvcOptions>, XmlSerializerMvcOptionsSetup>());
DependencyInjection\MvcXmlMvcCoreBuilderExtensions.cs (2)
98ServiceDescriptor.Transient<IConfigureOptions<MvcOptions>, XmlDataContractSerializerMvcOptionsSetup>()); 105ServiceDescriptor.Transient<IConfigureOptions<MvcOptions>, XmlSerializerMvcOptionsSetup>());
DependencyInjection\XmlDataContractSerializerMvcOptionsSetup.cs (5)
16/// data contract serializer formatters to <see cref="MvcOptions"/>. 18internal sealed class XmlDataContractSerializerMvcOptionsSetup : IConfigureOptions<MvcOptions> 32/// Adds the data contract serializer formatters to <see cref="MvcOptions"/>. 34/// <param name="options">The <see cref="MvcOptions"/>.</param> 35public void Configure(MvcOptions options)
DependencyInjection\XmlSerializerMvcOptionsSetup.cs (5)
14/// XML serializer formatters to <see cref="MvcOptions"/>. 16internal sealed class XmlSerializerMvcOptionsSetup : IConfigureOptions<MvcOptions> 30/// Adds the XML serializer formatters to <see cref="MvcOptions"/>. 32/// <param name="options">The <see cref="MvcOptions"/>.</param> 33public void Configure(MvcOptions options)
XmlDataContractSerializerInputFormatter.cs (3)
23private readonly MvcOptions _options; 29/// <param name="options">The <see cref="MvcOptions"/>.</param> 30public XmlDataContractSerializerInputFormatter(MvcOptions options)
XmlDataContractSerializerOutputFormatter.cs (2)
28private MvcOptions? _mvcOptions; 224_mvcOptions ??= httpContext.RequestServices.GetRequiredService<IOptions<MvcOptions>>().Value;
XmlSerializerInputFormatter.cs (3)
23private readonly MvcOptions _options; 28/// <param name="options">The <see cref="MvcOptions"/>.</param> 29public XmlSerializerInputFormatter(MvcOptions options)
XmlSerializerOutputFormatter.cs (2)
27private MvcOptions? _mvcOptions; 203_mvcOptions ??= httpContext.RequestServices.GetRequiredService<IOptions<MvcOptions>>().Value;
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (10)
DependencyInjection\XmlDataContractSerializerMvcOptionsSetupTest.cs (4)
17var options = new MvcOptions(); 32var options = new MvcOptions(); 48var options = new MvcOptions(); 62var options = new MvcOptions();
DependencyInjection\XmlSerializerMvcOptionsSetupTest.cs (4)
17var options = new MvcOptions(); 32var options = new MvcOptions(); 48var options = new MvcOptions(); 62var options = new MvcOptions();
XmlDataContractSerializerInputFormatterTest.cs (1)
334var mvcOptions = new MvcOptions() { SuppressInputFormatterBuffering = false };
XmlSerializerInputFormatterTest.cs (1)
198var mvcOptions = new MvcOptions();
Microsoft.AspNetCore.Mvc.FunctionalTests (5)
DoNotRespectBrowserAcceptHeaderTests.cs (1)
18/// These tests are for scenarios when <see cref="MvcOptions.RespectBrowserAcceptHeader"/> is <c>False</c>, which is the default.
InputParentValidationTests.cs (3)
18/// Functional tests for verifying the impact of using <see cref="MvcOptions.ValidateComplexTypesIfChildValidationFails"/> 110/// Scenarios for verifying the impact of setting <see cref="MvcOptions.ValidateComplexTypesIfChildValidationFails"/> 119/// Scenarios for verifying the impact of leaving <see cref="MvcOptions.ValidateComplexTypesIfChildValidationFails"/>
RespectBrowserAcceptHeaderTests.cs (1)
16/// These tests are for scenarios when <see cref="MvcOptions.RespectBrowserAcceptHeader"/> is <c>True</c>(default is False).
Microsoft.AspNetCore.Mvc.IntegrationTests (79)
ArrayModelBinderIntegrationTest.cs (4)
376$"{nameof(MvcOptions)}.{nameof(MvcOptions.MaxModelBindingCollectionSize)} (1024). This limit is a " + 379$"always succeeds. See the {nameof(MvcOptions)}.{nameof(MvcOptions.MaxModelBindingCollectionSize)} " +
BindingSourceMetadataProviderIntegrationTest.cs (2)
19var options = new MvcOptions(); 73var options = new MvcOptions();
CollectionModelBinderIntegrationTest.cs (12)
973$"{nameof(MvcOptions)}.{nameof(MvcOptions.MaxModelBindingCollectionSize)} (1024). This limit is a " + 976$"always succeeds. See the {nameof(MvcOptions)}.{nameof(MvcOptions.MaxModelBindingCollectionSize)} " + 1058$"{nameof(MvcOptions)}.{nameof(MvcOptions.MaxModelBindingCollectionSize)} (3). This limit is a " + 1061$"always succeeds. See the {nameof(MvcOptions)}.{nameof(MvcOptions.MaxModelBindingCollectionSize)} " + 1097$"{nameof(MvcOptions)}.{nameof(MvcOptions.MaxModelBindingCollectionSize)} (1024). This limit is a " + 1100$"always succeeds. See the {nameof(MvcOptions)}.{nameof(MvcOptions.MaxModelBindingCollectionSize)} " +
ComplexRecordIntegrationTest.cs (12)
3306$"{nameof(MvcOptions)}.{nameof(MvcOptions.MaxModelBindingRecursionDepth)} (32). Reduce the " + 3309$"{nameof(MvcOptions)}.{nameof(MvcOptions.MaxModelBindingRecursionDepth)} documentation for more " + 3374$"{nameof(MvcOptions)}.{nameof(MvcOptions.MaxModelBindingRecursionDepth)} (3). Reduce the " + 3377$"{nameof(MvcOptions)}.{nameof(MvcOptions.MaxModelBindingRecursionDepth)} documentation for more " + 3410$"{nameof(MvcOptions)}.{nameof(MvcOptions.MaxModelBindingRecursionDepth)} (32). Reduce the " + 3413$"{nameof(MvcOptions)}.{nameof(MvcOptions.MaxModelBindingRecursionDepth)} documentation for more " +
ComplexTypeIntegrationTestBase.cs (13)
3541$"{nameof(MvcOptions)}.{nameof(MvcOptions.MaxModelBindingRecursionDepth)} (32). Reduce the " + 3544$"{nameof(MvcOptions)}.{nameof(MvcOptions.MaxModelBindingRecursionDepth)} documentation for more " + 3625$"{nameof(MvcOptions)}.{nameof(MvcOptions.MaxModelBindingRecursionDepth)} (3). Reduce the " + 3628$"{nameof(MvcOptions)}.{nameof(MvcOptions.MaxModelBindingRecursionDepth)} documentation for more " + 3679$"{nameof(MvcOptions)}.{nameof(MvcOptions.MaxModelBindingRecursionDepth)} (32). Reduce the " + 3682$"{nameof(MvcOptions)}.{nameof(MvcOptions.MaxModelBindingRecursionDepth)} documentation for more " + 3765Action<MvcOptions> updateOptions = null,
ComplexTypeModelBinderIntegrationTest.cs (1)
17Action<MvcOptions> updateOptions = null,
DictionaryModelBinderIntegrationTest.cs (4)
1201$"{nameof(MvcOptions)}.{nameof(MvcOptions.MaxModelBindingCollectionSize)} (1024). This limit is a " + 1205$"{nameof(MvcOptions)}.{nameof(MvcOptions.MaxModelBindingCollectionSize)} documentation for more " +
ExcludeBindingMetadataProviderIntegrationTest.cs (2)
18var options = new MvcOptions(); 64var options = new MvcOptions();
HasValidatorsValidationMetadataProviderIntegrationTest.cs (2)
25var options = services.GetRequiredService<IOptions<MvcOptions>>(); 43var options = services.GetRequiredService<IOptions<MvcOptions>>();
HeaderModelBinderIntegrationTest.cs (1)
437Action<MvcOptions> updateOptions = null)
ModelBindingTestContext.cs (1)
12public MvcOptions MvcOptions { get; set; }
ModelBindingTestHelper.cs (15)
23Action<MvcOptions> updateOptions = null, 26MvcOptions mvcOptions = null) 31var options = services.GetRequiredService<IOptions<MvcOptions>>(); 47MvcOptions options = null, 70var options = serviceProvider.GetRequiredService<IOptions<MvcOptions>>(); 86MvcOptions mvcOptions = null, 90var options = services.GetRequiredService<IOptions<MvcOptions>>(); 119var options = services.GetRequiredService<IOptions<MvcOptions>>(); 126IOptions<MvcOptions> options = null) 134private static IList<IModelValidatorProvider> GetModelValidatorProviders(IOptions<MvcOptions> options) 149Action<MvcOptions> updateOptions = null, 150MvcOptions mvcOptions = null) 164Action<MvcOptions> updateOptions = null, 165MvcOptions mvcOptions = null) 177var optionsAccessor = services.GetRequiredService<IOptions<MvcOptions>>();
ParameterBinderExtensions.cs (1)
21var optionsAccessor = context.HttpContext.RequestServices.GetService<IOptions<MvcOptions>>();
TestMvcOptions.cs (2)
15public class TestMvcOptions : IOptions<MvcOptions> 50public MvcOptions Value { get; }
TryValidateModelIntegrationTest.cs (2)
210Action<MvcOptions> optionsConfigurator 213var options = actionContext.HttpContext.RequestServices.GetRequiredService<IOptions<MvcOptions>>();
ValidationIntegrationTests.cs (4)
1775var options = new TestMvcOptions().Value; 2518var options = services.GetRequiredService<IOptions<MvcOptions>>().Value; 2578public RecordingObjectValidator(IModelMetadataProvider modelMetadataProvider, IList<IModelValidatorProvider> validatorProviders, MvcOptions mvcOptions)
ValidationWithRecordIntegrationTests.cs (1)
1578var options = new TestMvcOptions().Value;
Microsoft.AspNetCore.Mvc.NewtonsoftJson (22)
DependencyInjection\NewtonsoftJsonMvcCoreBuilderExtensions.cs (1)
60ServiceDescriptor.Transient<IConfigureOptions<MvcOptions>, NewtonsoftJsonMvcOptionsSetup>());
DependencyInjection\NewtonsoftJsonMvcOptionsSetup.cs (3)
18/// Sets up JSON formatter options for <see cref="MvcOptions"/>. 20internal sealed class NewtonsoftJsonMvcOptionsSetup : IConfigureOptions<MvcOptions> 44public void Configure(MvcOptions options)
MvcNewtonsoftJsonOptions.cs (2)
42/// Gets the maximum size to buffer in memory when <see cref="MvcOptions.SuppressInputFormatterBuffering"/> is not set. 61/// Gets the maximum size to buffer in memory when <see cref="MvcOptions.SuppressOutputFormatterBuffering"/> is not set.
NewtonsoftJsonInputFormatter.cs (3)
25private readonly MvcOptions _options; 41/// <param name="options">The <see cref="MvcOptions"/>.</param> 48MvcOptions options,
NewtonsoftJsonOutputFormatter.cs (5)
21private readonly MvcOptions _mvcOptions; 35/// <param name="mvcOptions">The <see cref="MvcOptions"/>.</param> 40MvcOptions mvcOptions) : this(serializerSettings, charPool, mvcOptions, jsonOptions: null) 53/// <param name="mvcOptions">The <see cref="MvcOptions"/>.</param> 58MvcOptions mvcOptions,
NewtonsoftJsonPatchInputFormatter.cs (2)
30/// <param name="options">The <see cref="MvcOptions"/>.</param> 37MvcOptions options,
NewtonsoftJsonResultExecutor.cs (3)
29private readonly MvcOptions _mvcOptions; 39/// <param name="mvcOptions">Accessor to <see cref="MvcOptions"/>.</param> 45IOptions<MvcOptions> mvcOptions,
src\Mvc\Mvc.Core\src\Infrastructure\AsyncEnumerableReader.cs (3)
35private readonly MvcOptions _mvcOptions; 40/// <param name="mvcOptions">Accessor to <see cref="MvcOptions"/>.</param> 41public AsyncEnumerableReader(MvcOptions mvcOptions)
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (15)
NewtonsoftJsonInputFormatterTest.cs (2)
61var mvcOptions = new MvcOptions() 97var mvcOptions = new MvcOptions()
NewtonsoftJsonPatchInputFormatterTest.cs (1)
60var mvcOptions = new MvcOptions()
src\Mvc\Mvc.Core\test\Infrastructure\AsyncEnumerableReaderTest.cs (12)
18var options = new MvcOptions(); 33var options = new MvcOptions(); 51var options = new MvcOptions(); 69var options = new MvcOptions(); 86var options = new MvcOptions(); 103var options = new MvcOptions(); 121var options = new MvcOptions(); 138var options = new MvcOptions(); 156var options = new MvcOptions(); 178var options = new MvcOptions { MaxIAsyncEnumerableBufferLimit = 10 }; 194var options = new MvcOptions(); 207var options = new MvcOptions();
Microsoft.AspNetCore.Mvc.RazorPages (17)
ApplicationModels\AuthorizationPageApplicationModelProvider.cs (2)
14private readonly MvcOptions _mvcOptions; 18IOptions<MvcOptions> mvcOptions)
ApplicationModels\PageConventionCollection.cs (3)
17private MvcOptions? _mvcOptions; 42internal MvcOptions MvcOptions 47_mvcOptions ??= _serviceProvider!.GetRequiredService<IOptions<MvcOptions>>().Value;
ApplicationModels\ResponseCacheFilterApplicationModelProvider.cs (2)
13private readonly MvcOptions _mvcOptions; 16public ResponseCacheFilterApplicationModelProvider(IOptions<MvcOptions> mvcOptionsAccessor, ILoggerFactory loggerFactory)
Infrastructure\CompiledPageActionDescriptorFactory.cs (1)
25MvcOptions mvcOptions,
Infrastructure\CompiledPageActionDescriptorProvider.cs (2)
30/// <param name="mvcOptions">Accessor to <see cref="MvcOptions"/>.</param> 36IOptions<MvcOptions> mvcOptions,
Infrastructure\DefaultPageLoader.cs (1)
25IOptions<MvcOptions> mvcOptions)
Infrastructure\PageActionDescriptorProvider.cs (3)
19private readonly MvcOptions _mvcOptions; 26/// <param name="mvcOptionsAccessor">The <see cref="MvcOptions"/>.</param> 30IOptions<MvcOptions> mvcOptionsAccessor,
Infrastructure\PageActionInvokerProvider.cs (1)
35IOptions<MvcOptions> mvcOptions,
Infrastructure\PageRequestDelegateFactory.cs (2)
36IOptions<MvcOptions> mvcOptions, 50IOptions<MvcOptions> mvcOptions,
Microsoft.AspNetCore.Mvc.RazorPages.Test (14)
ApplicationModels\AuthorizationPageApplicationModelProviderTest.cs (1)
17private readonly IOptions<MvcOptions> OptionsWithoutEndpointRouting = Options.Create(new MvcOptions { EnableEndpointRouting = false });
DependencyInjection\PageConventionCollectionExtensionsTest.cs (2)
978var options = new MvcOptions { EnableEndpointRouting = enableEndpointRouting }; 980.AddSingleton<IOptions<MvcOptions>>(Options.Options.Create(options))
Infrastructure\PageActionDescriptorProviderTest.cs (8)
21GetAccessor<MvcOptions>(), 52GetAccessor<MvcOptions>(), 91GetAccessor<MvcOptions>(), 141GetAccessor<MvcOptions>(), 187GetAccessor<MvcOptions>(), 221GetAccessor<MvcOptions>(), 275GetAccessor<MvcOptions>(), 319GetAccessor<MvcOptions>(),
Infrastructure\PageActionInvokerProviderTest.cs (1)
497MvcOptions mvcOptions = null)
Infrastructure\PageBinderFactoryTest.cs (2)
20private static readonly MvcOptions _options = new MvcOptions(); 21private static readonly IOptions<MvcOptions> _optionsAccessor = Options.Create(_options);
Microsoft.AspNetCore.Mvc.Test (19)
MvcOptionsSetupTest.cs (16)
43var options = GetOptions<MvcOptions>(); 72var options = GetOptions<MvcOptions>(); 88var options = GetOptions<MvcOptions>(); 102var options = GetOptions<MvcOptions>(); 114var options = GetOptions<MvcOptions>(); 125var options = GetOptions<MvcOptions>(); 150var options = GetOptions<MvcOptions>(); 160var options = GetOptions<MvcOptions>(services =>
MvcServiceCollectionExtensionsTest.cs (3)
246Assert.Contains(services, s => s.ServiceType == typeof(IConfigureOptions<MvcOptions>) && s.ImplementationType == typeof(MvcDataAnnotationsMvcOptionsSetup)); 478typeof(IConfigureOptions<MvcOptions>), 519typeof(IPostConfigureOptions<MvcOptions>),
Microsoft.AspNetCore.Mvc.ViewFeatures (6)
DependencyInjection\MvcViewFeaturesMvcCoreBuilderExtensions.cs (1)
139ServiceDescriptor.Transient<IConfigureOptions<MvcOptions>, TempDataMvcOptionsSetup>());
DependencyInjection\TempDataMvcOptionsSetup.cs (3)
11/// Sets up default options for <see cref="MvcOptions"/>. 13internal sealed class TempDataMvcOptionsSetup : IConfigureOptions<MvcOptions> 15public void Configure(MvcOptions options)
Filters\AntiforgeryApplicationModelProvider.cs (2)
12internal sealed class AntiforgeryApplicationModelProvider(IOptions<MvcOptions> mvcOptions, ILogger<AntiforgeryMiddlewareAuthorizationFilter> logger) : IApplicationModelProvider 14private readonly MvcOptions _mvcOptions = mvcOptions.Value;
Microsoft.AspNetCore.OpenApi.Tests (1)
Services\OpenApiDocumentServiceTestsBase.cs (1)
59var options = new MvcOptions
Mvc.RoutingWebSite (3)
Startup.cs (1)
102protected virtual void ConfigureMvcOptions(MvcOptions options)
StartupRoutingDifferentBranches.cs (1)
77protected virtual void ConfigureMvcOptions(MvcOptions options)
StartupWithoutEndpointRouting.cs (1)
65protected override void ConfigureMvcOptions(MvcOptions options)
VersioningWebSite (2)
Startup.cs (1)
29protected virtual void ConfigureMvcOptions(MvcOptions options)
StartupWithoutEndpointRouting.cs (1)
15protected override void ConfigureMvcOptions(MvcOptions options)
XmlFormattersWebSite (3)
Controllers\XmlDataContractApiController.cs (1)
26var mvcOptions = context.HttpContext.RequestServices.GetRequiredService<IOptions<MvcOptions>>();
Controllers\XmlSerializedApiController.cs (1)
26var mvcOptions = context.HttpContext.RequestServices.GetRequiredService<IOptions<MvcOptions>>();
Startup.cs (1)
20services.Configure<MvcOptions>(options =>