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