Base:
method
GetMetadataForType
Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadataProvider.GetMetadataForType(System.Type)
123 references to GetMetadataForType
Microsoft.AspNetCore.Mvc.Abstractions.Test (14)
ModelBinding\BindingInfoTest.cs (10)
112var modelMetadata = provider.GetMetadataForType(modelType); 133var modelMetadata = provider.GetMetadataForType(modelType); 161var modelMetadata = provider.GetMetadataForType(modelType); 184var modelMetadata = provider.GetMetadataForType(modelType); 210var modelMetadata = provider.GetMetadataForType(modelType); 237var modelMetadata = provider.GetMetadataForType(modelType); 259var modelMetadata = provider.GetMetadataForType(modelType); 281var modelMetadata = provider.GetMetadataForType(modelType); 302var modelMetadata = provider.GetMetadataForType(modelType); 324var modelMetadata = provider.GetMetadataForType(modelType);
ModelBinding\ModelStateDictionaryTest.cs (4)
1058var metadata = provider.GetMetadataForType(typeof(int)); 1175var metadata = provider.GetMetadataForType(typeof(int)); 1248var metadata = provider.GetMetadataForType(typeof(int)); 1268var metadata = provider.GetMetadataForType(typeof(int));
Microsoft.AspNetCore.Mvc.Core (1)
ModelBinding\Metadata\DefaultModelMetadataProvider.cs (1)
392/// <see cref="GetMetadataForType(Type)"/>. Override this method to provide a different
Microsoft.AspNetCore.Mvc.Core.Test (82)
Controllers\ControllerBinderDelegateProviderTest.cs (1)
244context.ModelMetadata = metadataProvider.GetMetadataForType(typeof(string));
Formatters\InputFormatterTest.cs (11)
38var metadata = provider.GetMetadataForType(typeof(void)); 72var metadata = provider.GetMetadataForType(typeof(void)); 103var metadata = provider.GetMetadataForType(typeof(void)); 137var metadata = provider.GetMetadataForType(typeof(void)); 168var metadata = provider.GetMetadataForType(typeof(void)); 205var metadata = provider.GetMetadataForType(typeof(void)); 235var metadata = provider.GetMetadataForType(typeof(void)); 273var metadata = provider.GetMetadataForType(typeof(void)); 302var metadata = provider.GetMetadataForType(typeof(void)); 389new EmptyModelMetadataProvider().GetMetadataForType(typeof(object)), 418new EmptyModelMetadataProvider().GetMetadataForType(typeof(object)),
Formatters\JsonInputFormatterTestBase.cs (1)
655var metadata = provider.GetMetadataForType(modelType);
Formatters\TextInputFormatterTest.cs (7)
23new EmptyModelMetadataProvider().GetMetadataForType(typeof(object)), 51new EmptyModelMetadataProvider().GetMetadataForType(typeof(object)), 73new EmptyModelMetadataProvider().GetMetadataForType(typeof(object)), 97new EmptyModelMetadataProvider().GetMetadataForType(typeof(object)), 123new EmptyModelMetadataProvider().GetMetadataForType(typeof(object)), 157new EmptyModelMetadataProvider().GetMetadataForType(typeof(object)), 191new EmptyModelMetadataProvider().GetMetadataForType(typeof(object)),
ModelBinding\Binders\BinderTypeModelBinderTest.cs (1)
79ModelMetadata = metadataProvider.GetMetadataForType(modelType),
ModelBinding\Binders\ByteArrayModelBinderTests.cs (1)
108ModelMetadata = metadataProvider.GetMetadataForType(modelType),
ModelBinding\Binders\CancellationTokenModelBinderTests.cs (1)
35ModelMetadata = metadataProvider.GetMetadataForType(modelType),
ModelBinding\Binders\CollectionModelBinderTest.cs (1)
367bindingContext.ModelMetadata = metadataProvider.GetMetadataForType(typeof(List<string>));
ModelBinding\Binders\DateTimeModelBinderTest.cs (1)
212ModelMetadata = new EmptyModelMetadataProvider().GetMetadataForType(modelType),
ModelBinding\Binders\DictionaryModelBinderTest.cs (1)
342var valueMetadata = metadataProvider.GetMetadataForType(typeof(ModelWithProperties));
ModelBinding\Binders\FloatingPointTypeModelBinderTestOfT.cs (1)
373ModelMetadata = new EmptyModelMetadataProvider().GetMetadataForType(modelType),
ModelBinding\Binders\FormCollectionModelBinderTest.cs (1)
75ModelMetadata = metadataProvider.GetMetadataForType(modelType),
ModelBinding\Binders\FormFileModelBinderTest.cs (4)
54new EmptyModelMetadataProvider().GetMetadataForType(typeof(IFormFile)), 169new EmptyModelMetadataProvider().GetMetadataForType(typeof(IFormFile)), 205new EmptyModelMetadataProvider().GetMetadataForType(typeof(IFormFile)), 448var metadata = metadataProvider.GetMetadataForType(modelType);
ModelBinding\Binders\HeaderModelBinderTests.cs (1)
393return metadataProvider.GetMetadataForType(modelType);
ModelBinding\Binders\KeyValuePairModelBinderTest.cs (2)
158bindingContext.ModelMetadata = metadataProvider.GetMetadataForType(typeof(KeyValuePair<string, string>)); 220ModelMetadata = metadataProvider.GetMetadataForType(keyValuePairType),
ModelBinding\Binders\ServicesModelBinderTest.cs (1)
37var modelMetadata = metadataProvider.GetMetadataForType(modelType);
ModelBinding\Binders\SimpleTypeModelBinderTest.cs (3)
53bindingContext.ModelMetadata = metadataProvider.GetMetadataForType(typeof(string)); 170metadataProvider.GetMetadataForType(typeof(int)), 490ModelMetadata = new EmptyModelMetadataProvider().GetMetadataForType(modelType),
ModelBinding\Binders\TryParseTypeModelBinderTest.cs (2)
119metadataProvider.GetMetadataForType(typeof(int)), 495ModelMetadata = new EmptyModelMetadataProvider().GetMetadataForType(modelType),
ModelBinding\DefaultModelBindingContextTest.cs (6)
23ModelMetadata = new TestModelMetadataProvider().GetMetadataForType(typeof(object)), 37var newModelMetadata = metadataProvider.GetMetadataForType(typeof(object)); 75metadataProvider.GetMetadataForType(typeof(object)), 98metadataProvider.GetMetadataForType(typeof(string)), 127metadataProvider.GetMetadataForType(typeof(string)), 148ModelMetadata = new EmptyModelMetadataProvider().GetMetadataForType(typeof(int))
ModelBinding\Metadata\DefaultModelMetadataProviderTest.cs (7)
18var metadata = provider.GetMetadataForType(typeof(ModelType)); 34var metadata1 = Assert.IsType<DefaultModelMetadata>(provider.GetMetadataForType(typeof(ModelType))); 35var metadata2 = Assert.IsType<DefaultModelMetadata>(provider.GetMetadataForType(typeof(ModelType))); 52var metadata1 = provider.GetMetadataForType(typeof(object)); 53var metadata2 = provider.GetMetadataForType(typeof(object)); 144var metadata1 = Assert.IsType<DefaultModelMetadata>(provider.GetMetadataForType(typeof(ModelType))); 145var metadata2 = Assert.IsType<DefaultModelMetadata>(provider.GetMetadataForType(typeof(ModelType)));
ModelBinding\ModelBinderFactoryTest.cs (12)
30Metadata = metadataProvider.GetMetadataForType(typeof(string)), 52Metadata = metadataProvider.GetMetadataForType(typeof(string)), 88Metadata = metadataProvider.GetMetadataForType(typeof(Widget)), 167Metadata = metadataProvider.GetMetadataForType(typeof(Widget)), 207Metadata = metadataProvider.GetMetadataForType(typeof(Employee)), 237Metadata = metadataProvider.GetMetadataForType(typeof(Employee)), 268Metadata = metadataProvider.GetMetadataForType(typeof(Employee)), 379Metadata = metadataProvider.GetMetadataForType(typeof(Employee)), 435Metadata = metadataProvider.GetMetadataForType(typeof(Widget)), 497Metadata = metadataProvider.GetMetadataForType(typeof(Widget)), 551Metadata = metadataProvider.GetMetadataForType(typeof(Widget)), 615Metadata = metadataProvider.GetMetadataForType(typeof(Widget)),
ModelBinding\ModelBindingHelperTest.cs (5)
641var modelMetadata = metadataProvider.GetMetadataForType(typeof(Product)); 673var modelMetadata = metadataProvider.GetMetadataForType(typeof(string)); 697var modelMetadata = metadataProvider.GetMetadataForType(typeof(List<Product>)); 742var modelMetadata = metadataProvider.GetMetadataForType(typeof(Product)); 1524var metadata = metadataProvider.GetMetadataForType(modelType);
ModelBinding\ParameterBinderTest.cs (5)
178{ attribute, parameterDescriptor, provider2.GetMetadataForType(typeof(Person)) }, 179{ attribute, controllerParameterDescriptor, provider2.GetMetadataForType(typeof(Person)) }, 542var modelMetadata = modelMetadataProvider.GetMetadataForType(typeof(IJsonPatchDocument)); 604var modelMetadata = modelMetadataProvider.GetMetadataForType(typeof(IJsonPatchDocument)); 672var modelMetadata = modelMetadataProvider.GetMetadataForType(typeof(string));
ModelBinding\TestModelBinderProviderContext.cs (1)
29Metadata = CachedMetadataProvider.GetMetadataForType(modelType);
ModelBinding\UnsupportedContentTypeFilterTest.cs (2)
29.GetMetadataForType(typeof(int)); 112.GetMetadataForType(typeof(int));
ModelBinding\Validation\ClientValidatorCacheTest.cs (2)
71var metadata = modelMetadataProvider.GetMetadataForType(typeof(TestRecordType)); 92var metadata = modelMetadataProvider.GetMetadataForType(typeof(TestRecordTypeWithProperty));
ModelBinding\Validation\CompositeModelValidatorProviderTest.cs (1)
35var modelMetadata = new EmptyModelMetadataProvider().GetMetadataForType(typeof(string));
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (1)
NumericClientModelValidatorTest.cs (1)
112var metadata = provider.GetMetadataForType(typeof(int));
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (8)
XmlDataContractSerializerInputFormatterTest.cs (4)
76var metadata = provider.GetMetadataForType(typeof(string)); 514var metadata = provider.GetMetadataForType(typeof(TestLevelOne)); 578var metadata = provider.GetMetadataForType(typeof(TestLevelOne)); 725var metadata = provider.GetMetadataForType(modelType);
XmlSerializerInputFormatterTest.cs (4)
255var metadata = provider.GetMetadataForType(typeof(string)); 535var metadata = provider.GetMetadataForType(typeof(TestLevelOne)); 599var metadata = provider.GetMetadataForType(typeof(TestLevelOne)); 661var metadata = provider.GetMetadataForType(modelType);
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (3)
NewtonsoftJsonPatchInputFormatterTest.cs (2)
188var metadata = provider.GetMetadataForType(modelType); 244var metadata = provider.GetMetadataForType(modelType);
src\Mvc\Mvc.Core\test\Formatters\JsonInputFormatterTestBase.cs (1)
655var metadata = provider.GetMetadataForType(modelType);
Microsoft.AspNetCore.Mvc.TagHelpers.Test (5)
LabelTagHelperTest.cs (1)
168var containerMetadata = metadataProvider.GetMetadataForType(containerType);
SelectTagHelperTest.cs (3)
190var containerMetadata = metadataProvider.GetMetadataForType(containerType); 280var containerMetadata = metadataProvider.GetMetadataForType(containerType); 460var containerMetadata = metadataProvider.GetMetadataForType(containerType);
TextAreaTagHelperTest.cs (1)
99var containerMetadata = metadataProvider.GetMetadataForType(containerType);
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
ModelStateDictionaryExtensions.cs (1)
124var modelMetadata = new EmptyModelMetadataProvider().GetMetadataForType(typeof(TModel));
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (8)
Rendering\HtmlHelperValidationSummaryTest.cs (1)
680metadata = provider.GetMetadataForType(typeof(ValidationModel));
TemplateRendererTest.cs (1)
50var metadata = metadataProvider.GetMetadataForType(fieldType);
ViewDataDictionaryTest.cs (6)
54.Returns(new EmptyModelMetadataProvider().GetMetadataForType(typeof(object))) 73.Returns(new EmptyModelMetadataProvider().GetMetadataForType(typeof(TestModel))) 93.Returns(new EmptyModelMetadataProvider().GetMetadataForType(typeof(object))) 97.Returns(new EmptyModelMetadataProvider().GetMetadataForType(typeof(TestModel))) 349var metadata = metadataProvider.GetMetadataForType(originalMetadataType); 374var metadata = metadataProvider.GetMetadataForType(typeof(bool?));