14 references to Allow
FormatterWebSite (1)
Controllers\HomeController.cs (1)
46public IActionResult OptionalBody([FromBody(EmptyBodyBehavior = EmptyBodyBehavior.Allow)] DummyClass dummy)
Microsoft.AspNetCore.Mvc.Abstractions (1)
ModelBinding\BindingInfo.cs (1)
265EmptyBodyBehavior = EmptyBodyBehavior.Allow;
Microsoft.AspNetCore.Mvc.Abstractions.Test (3)
ModelBinding\BindingInfoTest.cs (3)
54new FromBodyAttribute { EmptyBodyBehavior = EmptyBodyBehavior.Allow }, 62Assert.Equal(EmptyBodyBehavior.Allow, bindingInfo.EmptyBodyBehavior); 266Assert.Equal(EmptyBodyBehavior.Allow, bindingInfo.EmptyBodyBehavior);
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
DefaultApiDescriptionProvider.cs (1)
309parameter.IsRequired = !(parameter.BindingInfo.EmptyBodyBehavior == EmptyBodyBehavior.Allow);
Microsoft.AspNetCore.Mvc.ApiExplorer.Test (1)
DefaultApiDescriptionProviderTest.cs (1)
2055EmptyBodyBehavior = EmptyBodyBehavior.Allow,
Microsoft.AspNetCore.Mvc.Core (4)
ApplicationModels\InferParameterBindingInfoConvention.cs (1)
109fromBodyParameters[0].BindingInfo!.EmptyBodyBehavior = EmptyBodyBehavior.Allow;
FromBodyAttribute.cs (2)
52/// Specifying <see cref="EmptyBodyBehavior.Allow"/> or <see cref="EmptyBodyBehavior.Disallow" /> will override the framework defaults. 58bool IFromBodyMetadata.AllowEmpty => EmptyBodyBehavior == EmptyBodyBehavior.Allow;
ModelBinding\Binders\BodyModelBinderProvider.cs (1)
101return emptyBodyBehavior == EmptyBodyBehavior.Allow;
Microsoft.AspNetCore.Mvc.Core.Test (3)
ApplicationModels\InferParameterBindingInfoConventionTest.cs (2)
190Assert.Equal(EmptyBodyBehavior.Allow, bindingInfo.EmptyBodyBehavior); 216Assert.Equal(EmptyBodyBehavior.Allow, bindingInfo.EmptyBodyBehavior);
ModelBinding\Binders\BodyModelBinderProviderTest.cs (1)
112var allowEmpty = BodyModelBinderProvider.CalculateAllowEmptyBody(EmptyBodyBehavior.Allow, options: new MvcOptions());