9 instantiations of ModelAttribute
Microsoft.AspNetCore.Mvc.Core.Test (9)
ModelBinding\Metadata\DefaultModelMetadataProviderTest.cs (9)
438[Model("OnType")] 441[Model("OnProperty")] 448[Model("ParamAttrib1"), Model("ParamAttrib2")] object paramWithTwoAttributes) 453[Model("OnPropertyType")] 476private void GetMetadataForParameterTestMethod([Model("OnParameter")] ModelType parameter) 490[Model("OnDerivedType")] 493[Model("OnDerivedProperty")] 499[Model("OnProperty")]
24 references to ModelAttribute
Microsoft.AspNetCore.Mvc.Core.Test (24)
ModelBinding\Metadata\DefaultModelMetadataProviderTest.cs (24)
23var attribute = Assert.IsType<ModelAttribute>(Assert.Single(defaultMetadata.Attributes.Attributes)); 164Assert.Equal("OnProperty", Assert.IsType<ModelAttribute>(attributes[0]).Value); 165Assert.Equal("OnPropertyType", Assert.IsType<ModelAttribute>(attributes[1]).Value); 237var modelAttribute = Assert.IsType<ModelAttribute>(attribute); 242var modelAttribute = Assert.IsType<ModelAttribute>(attribute); 284a => Assert.Equal("OnParameter", Assert.IsType<ModelAttribute>(a).Value), 285a => Assert.Equal("OnDerivedType", Assert.IsType<ModelAttribute>(a).Value), 286a => Assert.Equal("OnType", Assert.IsType<ModelAttribute>(a).Value)); 296defaultPropertyMetadata.Attributes.Attributes.OfType<ModelAttribute>(), 297a => Assert.Equal("OnDerivedProperty", Assert.IsType<ModelAttribute>(a).Value)); 305defaultPropertyMetadata.Attributes.Attributes.OfType<ModelAttribute>(), 306a => Assert.Equal("OnProperty", Assert.IsType<ModelAttribute>(a).Value), 307a => Assert.Equal("OnPropertyType", Assert.IsType<ModelAttribute>(a).Value)); 368a => Assert.Equal("OnProperty", Assert.IsType<ModelAttribute>(a).Value), 369a => Assert.Equal("OnDerivedType", Assert.IsType<ModelAttribute>(a).Value), 370a => Assert.Equal("OnType", Assert.IsType<ModelAttribute>(a).Value)); 380defaultPropertyMetadata.Attributes.Attributes.OfType<ModelAttribute>(), 381a => Assert.Equal("OnDerivedProperty", Assert.IsType<ModelAttribute>(a).Value)); 389defaultPropertyMetadata.Attributes.Attributes.OfType<ModelAttribute>(), 390a => Assert.Equal("OnProperty", Assert.IsType<ModelAttribute>(a).Value), 391a => Assert.Equal("OnPropertyType", Assert.IsType<ModelAttribute>(a).Value));