20 instantiations of ApiBehaviorOptions
Microsoft.AspNetCore.Mvc.Core.Test (20)
ApplicationModels\ApiBehaviorApplicationModelProviderTest.cs (7)
151var provider = GetProvider(new ApiBehaviorOptions { SuppressMapClientErrors = true }); 161var provider = GetProvider(new ApiBehaviorOptions { SuppressModelStateInvalidFilter = true }); 171var provider = GetProvider(new ApiBehaviorOptions { SuppressConsumesConstraintForFormFileParameters = true }); 181var provider = GetProvider(new ApiBehaviorOptions { SuppressInferBindingSourcesForParameters = true }); 191var provider = GetProvider(new ApiBehaviorOptions { DisableImplicitFromServicesParameters = true }); 202var provider = GetProvider(new ApiBehaviorOptions { SuppressMapClientErrors = true }); 212options = options ?? new ApiBehaviorOptions
ControllerBaseTest.cs (1)
2555return new ApiBehaviorOptions
DependencyInjection\ApiBehaviorOptionsSetupTest.cs (2)
21var options = new ApiBehaviorOptions(); 132var options = new ApiBehaviorOptions();
Infrastructure\DefaultApiProblemDetailsWriterTest.cs (2)
171var writer = GetWriter(options: new ApiBehaviorOptions() { SuppressMapClientErrors = true }); 226options ??= new ApiBehaviorOptions();
Infrastructure\ModelStateInvalidFilterTest.cs (3)
18var options = new ApiBehaviorOptions 38var options = new ApiBehaviorOptions 57var options = new ApiBehaviorOptions
Infrastructure\ProblemDetailsFactoryTest.cs (1)
182var options = new ApiBehaviorOptions();
Infrastructure\ProblemDetalsClientErrorFactoryTest.cs (4)
17var problemDetailsFactory = new DefaultProblemDetailsFactory(Options.Create(new ApiBehaviorOptions 44var problemDetailsFactory = new DefaultProblemDetailsFactory(Options.Create(new ApiBehaviorOptions 74var problemDetailsFactory = new DefaultProblemDetailsFactory(Options.Create(new ApiBehaviorOptions 100var problemDetailsFactory = new DefaultProblemDetailsFactory(Options.Create(new ApiBehaviorOptions
50 references to ApiBehaviorOptions
BasicWebSite (1)
StartupWithCustomInvalidModelStateFactory.cs (1)
21services.Configure<ApiBehaviorOptions>(options =>
Microsoft.AspNetCore.Mvc.Core (24)
ApplicationModels\ApiBehaviorApplicationModelProvider.cs (2)
17IOptions<ApiBehaviorOptions> apiBehaviorOptions, 21var options = apiBehaviorOptions.Value;
ClientErrorData.cs (1)
8/// produced by consumers of <see cref="ApiBehaviorOptions.ClientErrorMapping"/>.
DependencyInjection\ApiBehaviorOptionsSetup.cs (3)
11internal sealed class ApiBehaviorOptionsSetup : IConfigureOptions<ApiBehaviorOptions> 15public void Configure(ApiBehaviorOptions options) 53internal static void ConfigureClientErrorMapping(ApiBehaviorOptions options)
DependencyInjection\MvcCoreMvcBuilderExtensions.cs (2)
155/// Configures <see cref="ApiBehaviorOptions"/>. 162Action<ApiBehaviorOptions> setupAction)
DependencyInjection\MvcCoreMvcCoreBuilderExtensions.cs (2)
198/// Configures <see cref="ApiBehaviorOptions"/>. 205Action<ApiBehaviorOptions> setupAction)
DependencyInjection\MvcCoreServiceCollectionExtensions.cs (1)
139ServiceDescriptor.Transient<IConfigureOptions<ApiBehaviorOptions>, ApiBehaviorOptionsSetup>());
Infrastructure\DefaultApiProblemDetailsWriter.cs (2)
15private readonly ApiBehaviorOptions _apiBehaviorOptions; 27IOptions<ApiBehaviorOptions> apiBehaviorOptions)
Infrastructure\DefaultProblemDetailsFactory.cs (2)
20private readonly ApiBehaviorOptions _options; 29IOptions<ApiBehaviorOptions> options,
Infrastructure\ModelStateInvalidFilter.cs (5)
15/// See <see cref="ApiBehaviorOptions"/> for ways to configure this filter. 21private readonly ApiBehaviorOptions _apiBehaviorOptions; 29public ModelStateInvalidFilter(ApiBehaviorOptions apiBehaviorOptions, ILogger logger) 35typeof(ApiBehaviorOptions), 36nameof(ApiBehaviorOptions.InvalidModelStateResponseFactory)));
Infrastructure\ModelStateInvalidFilterFactory.cs (1)
21var options = serviceProvider.GetRequiredService<IOptions<ApiBehaviorOptions>>();
Infrastructure\ProblemDetailsFactory.cs (2)
15/// Creates a <see cref="ProblemDetails" /> instance that configures defaults based on values specified in <see cref="ApiBehaviorOptions" />. 33/// Creates a <see cref="ValidationProblemDetails" /> instance that configures defaults based on values specified in <see cref="ApiBehaviorOptions" />.
ProducesErrorResponseTypeAttribute.cs (1)
11/// client error type to be <see cref="ProblemDetails"/>, if mapping client errors (<see cref="ApiBehaviorOptions.ClientErrorMapping"/>)
Microsoft.AspNetCore.Mvc.Core.Test (24)
ApplicationModels\ApiBehaviorApplicationModelProviderTest.cs (1)
210ApiBehaviorOptions options = null)
ControllerBaseTest.cs (10)
2344var options = GetApiBehaviorOptions(); 2372var options = GetApiBehaviorOptions(); 2394var options = GetApiBehaviorOptions(); 2415var options = GetApiBehaviorOptions(); 2436var options = GetApiBehaviorOptions(); 2462var options = GetApiBehaviorOptions(); 2489var options = GetApiBehaviorOptions(); 2513var options = GetApiBehaviorOptions(); 2534var options = GetApiBehaviorOptions(); 2553private static ApiBehaviorOptions GetApiBehaviorOptions()
DependencyInjection\ApiBehaviorOptionsSetupTest.cs (3)
21var options = new ApiBehaviorOptions(); 130private static ProblemDetailsFactory GetProblemDetailsFactory(Action<ApiBehaviorOptions> configure = null) 132var options = new ApiBehaviorOptions();
DependencyInjection\MvcBuilderExtensionsTest.cs (2)
153var options = serviceCollection. 155.GetRequiredService<IOptions<ApiBehaviorOptions>>()
DependencyInjection\MvcCoreBuilderExtensionsTest.cs (2)
96var options = serviceCollection. 98.GetRequiredService<IOptions<ApiBehaviorOptions>>()
DependencyInjection\MvcCoreServiceCollectionExtensionsTest.cs (1)
256typeof(IConfigureOptions<ApiBehaviorOptions>),
Infrastructure\DefaultApiProblemDetailsWriterTest.cs (1)
224private static DefaultApiProblemDetailsWriter GetWriter(ApiBehaviorOptions options = null, IOutputFormatter formatter = null)
Infrastructure\ModelStateInvalidFilterTest.cs (3)
18var options = new ApiBehaviorOptions 38var options = new ApiBehaviorOptions 57var options = new ApiBehaviorOptions
Infrastructure\ProblemDetailsFactoryTest.cs (1)
182var options = new ApiBehaviorOptions();
Microsoft.AspNetCore.Mvc.Test (1)
MvcServiceCollectionExtensionsTest.cs (1)
496typeof(IConfigureOptions<ApiBehaviorOptions>),