31 references to BindingBehavior
Microsoft.AspNetCore.Mvc.Core (9)
ModelBinding\BindingBehaviorAttribute.cs (5)
9
/// Specifies the <see cref="
BindingBehavior
"/> that should be applied.
17
/// <param name="behavior">The <see cref="
BindingBehavior
"/> to apply.</param>
18
public BindingBehaviorAttribute(
BindingBehavior
behavior)
24
/// Gets the <see cref="
BindingBehavior
"/> to apply.
26
public
BindingBehavior
Behavior { get; }
ModelBinding\BindNeverAttribute.cs (1)
20
: base(
BindingBehavior
.Never)
ModelBinding\BindRequiredAttribute.cs (1)
20
: base(
BindingBehavior
.Required)
ModelBinding\Metadata\DefaultBindingMetadataProvider.cs (2)
70
context.BindingMetadata.IsBindingAllowed = bindingBehavior.Behavior !=
BindingBehavior
.Never;
71
context.BindingMetadata.IsBindingRequired = bindingBehavior.Behavior ==
BindingBehavior
.Required;
Microsoft.AspNetCore.Mvc.Core.Test (20)
ModelBinding\Binders\ComplexObjectModelBinderTest.cs (5)
1161
[BindingBehavior(
BindingBehavior
.Optional)]
1167
[BindingBehavior(
BindingBehavior
.Optional)]
1175
[BindingBehavior(
BindingBehavior
.Optional)]
1198
[BindingBehavior(
BindingBehavior
.Optional)]
1268
[BindingBehavior(
BindingBehavior
.Optional)]
ModelBinding\Binders\ComplexTypeModelBinderTest.cs (5)
1336
[BindingBehavior(
BindingBehavior
.Optional)]
1342
[BindingBehavior(
BindingBehavior
.Optional)]
1350
[BindingBehavior(
BindingBehavior
.Optional)]
1373
[BindingBehavior(
BindingBehavior
.Optional)]
1443
[BindingBehavior(
BindingBehavior
.Optional)]
ModelBinding\Metadata\DefaultBindingMetadataProviderTest.cs (10)
158
new BindingBehaviorAttribute(
BindingBehavior
.Never),
204
new BindingBehaviorAttribute(
BindingBehavior
.Optional),
227
new BindingBehaviorAttribute(
BindingBehavior
.Required),
273
new BindingBehaviorAttribute(
BindingBehavior
.Never),
319
new BindingBehaviorAttribute(
BindingBehavior
.Optional),
342
new BindingBehaviorAttribute(
BindingBehavior
.Required),
416
new BindingBehaviorAttribute(
BindingBehavior
.Required),
494
new BindingBehaviorAttribute(
BindingBehavior
.Optional)
607
new BindingBehaviorAttribute(
BindingBehavior
.Required),
638
new BindingBehaviorAttribute(
BindingBehavior
.Required),
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (2)
ModelMetadataProviderTest.cs (2)
1031
[BindingBehavior(
BindingBehavior
.Optional)]
1034
[BindingBehavior(
BindingBehavior
.Never)]