2 types derived from BindingBehaviorAttribute
Microsoft.AspNetCore.Mvc.Core (2)
ModelBinding\BindNeverAttribute.cs (1)
14public sealed class BindNeverAttribute : BindingBehaviorAttribute
ModelBinding\BindRequiredAttribute.cs (1)
14public sealed class BindRequiredAttribute : BindingBehaviorAttribute
22 instantiations of BindingBehaviorAttribute
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)]
7 references to BindingBehaviorAttribute
Microsoft.AspNetCore.Mvc.Core (7)
ModelBinding\BindingBehaviorAttribute.cs (1)
15/// Initializes a new <see cref="BindingBehaviorAttribute"/> instance.
ModelBinding\Metadata\DefaultBindingMetadataProvider.cs (6)
67var bindingBehavior = FindBindingBehavior(context); 148private static BindingBehaviorAttribute? FindBindingBehavior(BindingMetadataProviderContext context) 155var matchingAttributes = context.PropertyAttributes!.OfType<BindingBehaviorAttribute>(); 158.GetCustomAttributes(typeof(BindingBehaviorAttribute), inherit: true) 159.OfType<BindingBehaviorAttribute>() 162return context.ParameterAttributes!.OfType<BindingBehaviorAttribute>().FirstOrDefault();