5 instantiations of RequiredAttributeAdapter
Microsoft.AspNetCore.Mvc.DataAnnotations (1)
ValidationAttributeAdapterProvider.cs (1)
36return new RequiredAttributeAdapter((RequiredAttribute)attribute, stringLocalizer);
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (4)
DataAnnotationsClientModelValidatorProviderTest.cs (1)
54Validator = new RequiredAttributeAdapter(new RequiredAttribute(), stringLocalizer: null),
RequiredAttributeAdapterTest.cs (3)
34var adapter = new RequiredAttributeAdapter(attribute, stringLocalizer: stringLocalizer.Object); 59var adapter = new RequiredAttributeAdapter(attribute, stringLocalizer: null); 84var adapter = new RequiredAttributeAdapter(attribute, stringLocalizer: null);
19 references to RequiredAttributeAdapter
Microsoft.AspNetCore.Mvc.Core.Test (8)
ModelBinding\Validation\ClientValidatorCacheTest.cs (8)
23var attribute1 = Assert.Single(validators1.OfType<RequiredAttributeAdapter>()).Attribute; 50var validator1 = Assert.Single(validators1.OfType<RequiredAttributeAdapter>()); 61Assert.Same(validator1, Assert.Single(validators2.OfType<RequiredAttributeAdapter>())); // cached 80var validator1 = Assert.Single(validators.OfType<RequiredAttributeAdapter>()); 100var validator1 = Assert.Single(validators.OfType<RequiredAttributeAdapter>());
Microsoft.AspNetCore.Mvc.DataAnnotations (2)
DataAnnotationsClientModelValidatorProvider.cs (1)
69hasRequiredAttribute |= validatorItem.Validator is RequiredAttributeAdapter;
RequiredAttributeAdapter.cs (1)
16/// Initializes a new instance of <see cref="RequiredAttributeAdapter"/>.
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (9)
DataAnnotationsClientModelValidatorProviderTest.cs (3)
35Assert.IsType<RequiredAttributeAdapter>(validatorItem.Validator); 111var adapter = Assert.IsType<RequiredAttributeAdapter>(validatorItem.Validator);
DefaultModelClientValidatorProviderTest.cs (2)
120Assert.Single(validatorItems, v => v.Validator is RequiredAttributeAdapter); 164Assert.Single(validatorItems, v => v.Validator is RequiredAttributeAdapter);
RequiredAttributeAdapterTest.cs (3)
34var adapter = new RequiredAttributeAdapter(attribute, stringLocalizer: stringLocalizer.Object); 59var adapter = new RequiredAttributeAdapter(attribute, stringLocalizer: null); 84var adapter = new RequiredAttributeAdapter(attribute, stringLocalizer: null);
ValidationAttributeAdapterProviderTest.cs (1)
41typeof(RequiredAttributeAdapter)