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> 18public BindingBehaviorAttribute(BindingBehavior behavior) 24/// Gets the <see cref="BindingBehavior"/> to apply. 26public BindingBehavior Behavior { get; }
ModelBinding\BindNeverAttribute.cs (1)
20: base(BindingBehavior.Never)
ModelBinding\BindRequiredAttribute.cs (1)
20: base(BindingBehavior.Required)
ModelBinding\Metadata\DefaultBindingMetadataProvider.cs (2)
70context.BindingMetadata.IsBindingAllowed = bindingBehavior.Behavior != BindingBehavior.Never; 71context.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)
158new BindingBehaviorAttribute(BindingBehavior.Never), 204new BindingBehaviorAttribute(BindingBehavior.Optional), 227new BindingBehaviorAttribute(BindingBehavior.Required), 273new BindingBehaviorAttribute(BindingBehavior.Never), 319new BindingBehaviorAttribute(BindingBehavior.Optional), 342new BindingBehaviorAttribute(BindingBehavior.Required), 416new BindingBehaviorAttribute(BindingBehavior.Required), 494new BindingBehaviorAttribute(BindingBehavior.Optional) 607new BindingBehaviorAttribute(BindingBehavior.Required), 638new BindingBehaviorAttribute(BindingBehavior.Required),
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (2)
ModelMetadataProviderTest.cs (2)
1031[BindingBehavior(BindingBehavior.Optional)] 1034[BindingBehavior(BindingBehavior.Never)]