1 write to PropertyAttributes
Microsoft.AspNetCore.Mvc.Core (1)
ModelBinding\Metadata\ModelAttributes.cs (1)
52PropertyAttributes = propertyAttributes.ToArray();
27 references to PropertyAttributes
Microsoft.AspNetCore.Mvc.Core (4)
ModelBinding\Metadata\BindingMetadataProviderContext.cs (1)
27PropertyAttributes = attributes.PropertyAttributes;
ModelBinding\Metadata\DisplayMetadataProviderContext.cs (1)
26PropertyAttributes = attributes.PropertyAttributes;
ModelBinding\Metadata\ModelAttributes.cs (1)
54Attributes = PropertyAttributes.Concat(TypeAttributes).ToArray();
ModelBinding\Metadata\ValidationMetadataProviderContext.cs (1)
27PropertyAttributes = attributes.PropertyAttributes;
Microsoft.AspNetCore.Mvc.Core.Test (22)
ModelBinding\Metadata\ModelAttributesTest.cs (22)
25Assert.Single(attributes.PropertyAttributes.OfType<RequiredAttribute>()); 26Assert.Single(attributes.PropertyAttributes.OfType<StringLengthAttribute>()); 49rangeAttributes = attributes.PropertyAttributes.OfType<RangeAttribute>().ToArray(); 56Assert.Single(attributes.PropertyAttributes.OfType<FromHeaderAttribute>()); 73Assert.Single(attributes.PropertyAttributes.OfType<RequiredAttribute>()); 74Assert.Single(attributes.PropertyAttributes.OfType<StringLengthAttribute>()); 92Assert.Single(attributes.PropertyAttributes.OfType<RequiredAttribute>()); 93Assert.Single(attributes.PropertyAttributes.OfType<StringLengthAttribute>()); 94Assert.DoesNotContain(typeof(RangeAttribute), attributes.PropertyAttributes); 111Assert.Single(attributes.PropertyAttributes.OfType<RequiredAttribute>()); 112Assert.Single(attributes.PropertyAttributes.OfType<RangeAttribute>()); 129Assert.Single(attributes.PropertyAttributes.OfType<RequiredAttribute>()); 130Assert.Single(attributes.PropertyAttributes.OfType<FromRouteAttribute>()); 152Assert.Null(attributes.PropertyAttributes); 170Assert.Equal(2, attributes.PropertyAttributes.Count); 171Assert.IsType<RequiredAttribute>(attributes.PropertyAttributes[0]); 172Assert.IsType<RangeAttribute>(attributes.PropertyAttributes[1]); 191Assert.Null(attributes.PropertyAttributes); 214Assert.Null(attributes.PropertyAttributes); 237Assert.Null(attributes.PropertyAttributes); 259Assert.Null(attributes.PropertyAttributes); 282Assert.IsType<BindRequiredAttribute>(Assert.Single(attributes.PropertyAttributes));
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (1)
ModelMetadataProviderTest.cs (1)
1084_attributes.Concat(e.ModelAttributes.PropertyAttributes),