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