Base:
property
ModelMetadata
Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext.ModelMetadata
73 writes to ModelMetadata
Microsoft.AspNetCore.Mvc.Core (2)
ModelBinding\DefaultModelBindingContext.cs (2)
227ModelMetadata = metadata, 265ModelMetadata = modelMetadata;
Microsoft.AspNetCore.Mvc.Core.Test (71)
BindAttributeTest.cs (1)
30context.ModelMetadata = new Mock<ModelMetadata>(identity).Object;
ModelBinding\Binders\ArrayModelBinderTest.cs (5)
24bindingContext.ModelMetadata = metadataProvider.GetMetadataForProperty( 73bindingContext.ModelMetadata = metadataProvider.GetMetadataForParameter(parameter); 107bindingContext.ModelMetadata = metadataProvider.GetMetadataForParameter(parameter); 151bindingContext.ModelMetadata = metadataProvider.GetMetadataForProperty( 198bindingContext.ModelMetadata = metadataProvider.GetMetadataForProperty(
ModelBinding\Binders\BinderTypeModelBinderTest.cs (1)
79ModelMetadata = metadataProvider.GetMetadataForType(modelType),
ModelBinding\Binders\BodyModelBinderTests.cs (1)
697ModelMetadata = 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 (6)
259bindingContext.ModelMetadata = metadataProvider.GetMetadataForParameter(parameter); 293bindingContext.ModelMetadata = metadataProvider.GetMetadataForParameter(parameter); 334bindingContext.ModelMetadata = metadataProvider.GetMetadataForParameter(parameter); 367bindingContext.ModelMetadata = metadataProvider.GetMetadataForType(typeof(List<string>)); 407bindingContext.ModelMetadata = metadataProvider.GetMetadataForProperty( 491bindingContext.ModelMetadata = metadata;
ModelBinding\Binders\ComplexObjectModelBinderTest.cs (9)
290ModelMetadata = metadata, 342ModelMetadata = metadata, 386ModelMetadata = metadata, 473ModelMetadata = GetMetadataForType(typeof(PersonWithBindExclusion)), 500ModelMetadata = GetMetadataForType(typeof(PersonWithBindExclusion)), 525ModelMetadata = GetMetadataForType(typeof(PersonWithBindExclusion)), 552ModelMetadata = GetMetadataForType(typeof(TypeWithIncludedPropertiesUsingBindAttribute)), 578ModelMetadata = GetMetadataForType(typeof(ModelWithMixedBindingBehaviors)), 1115ModelMetadata = metadata,
ModelBinding\Binders\ComplexTypeModelBinderTest.cs (14)
302ModelMetadata = metadata, 350ModelMetadata = metadata, 402ModelMetadata = metadata, 446ModelMetadata = metadata, 515ModelMetadata = GetMetadataForType(typeof(Person)) 533ModelMetadata = GetMetadataForType(typeof(PointStruct)), 559ModelMetadata = metadata, 574ModelMetadata = GetMetadataForProperty(typeof(Location), nameof(Location.Point)), 654ModelMetadata = GetMetadataForType(typeof(PersonWithBindExclusion)), 681ModelMetadata = GetMetadataForType(typeof(PersonWithBindExclusion)), 706ModelMetadata = GetMetadataForType(typeof(PersonWithBindExclusion)), 733ModelMetadata = GetMetadataForType(typeof(TypeWithIncludedPropertiesUsingBindAttribute)), 759ModelMetadata = GetMetadataForType(typeof(ModelWithMixedBindingBehaviors)), 1279ModelMetadata = metadata,
ModelBinding\Binders\DateTimeModelBinderTest.cs (1)
212ModelMetadata = new EmptyModelMetadataProvider().GetMetadataForType(modelType),
ModelBinding\Binders\DictionaryModelBinderTest.cs (12)
143bindingContext.ModelMetadata = metadataProvider.GetMetadataForProperty( 179bindingContext.ModelMetadata = metadataProvider.GetMetadataForParameter(parameter); 214bindingContext.ModelMetadata = metadataProvider.GetMetadataForProperty( 254bindingContext.ModelMetadata = metadataProvider.GetMetadataForParameter(parameter); 301bindingContext.ModelMetadata = metadataProvider.GetMetadataForProperty( 338bindingContext.ModelMetadata = metadataProvider.GetMetadataForProperty( 398bindingContext.ModelMetadata = metadataProvider.GetMetadataForProperty( 444bindingContext.ModelMetadata = metadataProvider.GetMetadataForParameter(parameter); 479bindingContext.ModelMetadata = metadataProvider.GetMetadataForParameter(parameter); 528bindingContext.ModelMetadata = metadataProvider.GetMetadataForParameter(parameter); 571bindingContext.ModelMetadata = metadataProvider.GetMetadataForProperty( 683bindingContext.ModelMetadata = metadata;
ModelBinding\Binders\EnumTypeModelBinderTest.cs (1)
243ModelMetadata = binderProviderContext.Metadata,
ModelBinding\Binders\FloatingPointTypeModelBinderTestOfT.cs (1)
373ModelMetadata = new EmptyModelMetadataProvider().GetMetadataForType(modelType),
ModelBinding\Binders\FormCollectionModelBinderTest.cs (1)
75ModelMetadata = metadataProvider.GetMetadataForType(modelType),
ModelBinding\Binders\FormFileModelBinderTest.cs (1)
463ModelMetadata = metadata,
ModelBinding\Binders\HeaderModelBinderTests.cs (1)
351ModelMetadata = metadata,
ModelBinding\Binders\KeyValuePairModelBinderTest.cs (3)
158bindingContext.ModelMetadata = metadataProvider.GetMetadataForType(typeof(KeyValuePair<string, string>)); 186bindingContext.ModelMetadata = metadataProvider.GetMetadataForProperty( 220ModelMetadata = metadataProvider.GetMetadataForType(keyValuePairType),
ModelBinding\Binders\ServicesModelBinderTest.cs (1)
51ModelMetadata = modelMetadata,
ModelBinding\Binders\SimpleTypeModelBinderTest.cs (4)
53bindingContext.ModelMetadata = metadataProvider.GetMetadataForType(typeof(string)); 181bindingContext.ModelMetadata = metadata; 266bindingContext.ModelMetadata = metadata; 490ModelMetadata = new EmptyModelMetadataProvider().GetMetadataForType(modelType),
ModelBinding\Binders\TryParseTypeModelBinderTest.cs (3)
130bindingContext.ModelMetadata = metadata; 193bindingContext.ModelMetadata = metadata; 495ModelMetadata = new EmptyModelMetadataProvider().GetMetadataForType(modelType),
ModelBinding\DefaultModelBindingContextTest.cs (2)
23ModelMetadata = new TestModelMetadataProvider().GetMetadataForType(typeof(object)), 148ModelMetadata = new EmptyModelMetadataProvider().GetMetadataForType(typeof(int))
ModelBinding\ModelBindingHelperTest.cs (1)
1533ModelMetadata = metadata,
85 references to ModelMetadata
Microsoft.AspNetCore.Mvc.Core (1)
ModelBinding\DefaultModelBindingContext.cs (1)
193/// <param name="metadata"><see cref="ModelMetadata"/> associated with the model.</param>
Microsoft.AspNetCore.Mvc.Core.Test (84)
BindAttributeTest.cs (1)
36Assert.Equal(isIncluded, propertyFilter(context.ModelMetadata));
ModelBinding\Binders\ComplexObjectModelBinderTest.cs (38)
31var binder = CreateBinder(bindingContext.ModelMetadata); 48var binder = CreateBinder(bindingContext.ModelMetadata); 63var binder = CreateBinder(bindingContext.ModelMetadata); 80var binder = CreateBinder(bindingContext.ModelMetadata); 107var binder = CreateBinder(bindingContext.ModelMetadata); 124var binder = CreateBinder(bindingContext.ModelMetadata); 140var binder = CreateBinder(bindingContext.ModelMetadata); 166var binder = CreateBinder(bindingContext.ModelMetadata); 194var binder = CreateBinder(bindingContext.ModelMetadata); 229var binder = CreateBinder(bindingContext.ModelMetadata); 263var binder = CreateBinder(bindingContext.ModelMetadata); 441var binders = bindingContext.ModelMetadata.Properties.ToDictionary( 476var binder = CreateBinder(bindingContext.ModelMetadata); 503var binder = CreateBinder(bindingContext.ModelMetadata); 528var binder = CreateBinder(bindingContext.ModelMetadata); 555var binder = CreateBinder(bindingContext.ModelMetadata); 581var binder = CreateBinder(bindingContext.ModelMetadata); 606var binder = CreateBinder(bindingContext.ModelMetadata, options => 671var binder = CreateBinder(bindingContext.ModelMetadata, options => 710var binder = CreateBinder(bindingContext.ModelMetadata, options => 742var binder = CreateBinder(bindingContext.ModelMetadata, options => 765var binder = CreateBinder(bindingContext.ModelMetadata, options => 790var binder = CreateBinder(bindingContext.ModelMetadata, options => 815var binder = CreateBinder(bindingContext.ModelMetadata, options => 842var binder = CreateBinder(bindingContext.ModelMetadata, options => 872var binder = CreateBinder(bindingContext.ModelMetadata); 896var binder = CreateBinder(bindingContext.ModelMetadata); 920var binder = CreateBinder(bindingContext.ModelMetadata); 942var binder = CreateBinder(bindingContext.ModelMetadata); 981var propertyMetadata = bindingContext.ModelMetadata.Properties[propertyName]; 984var binder = CreateBinder(bindingContext.ModelMetadata); 1008var binder = CreateBinder(bindingContext.ModelMetadata); 1024var propertyMetadata = bindingContext.ModelMetadata.Properties[nameof(model.DateOfBirth)]; 1027var binder = CreateBinder(bindingContext.ModelMetadata); 1048var propertyMetadata = bindingContext.ModelMetadata.Properties[nameof(model.DateOfDeath)]; 1051var binder = CreateBinder(bindingContext.ModelMetadata); 1069var propertyMetadata = bindingContext.ModelMetadata.Properties[nameof(model.NameNoAttribute)]; 1072var binder = CreateBinder(bindingContext.ModelMetadata);
ModelBinding\Binders\ComplexTypeModelBinderTest.cs (43)
30var binder = CreateBinder(bindingContext.ModelMetadata); 47var binder = CreateBinder(bindingContext.ModelMetadata); 62var binder = CreateBinder(bindingContext.ModelMetadata); 79var binder = CreateBinder(bindingContext.ModelMetadata); 106var binder = CreateBinder(bindingContext.ModelMetadata); 123var binder = CreateBinder(bindingContext.ModelMetadata); 139var binder = CreateBinder(bindingContext.ModelMetadata); 165var binder = CreateBinder(bindingContext.ModelMetadata); 193var binder = CreateBinder(bindingContext.ModelMetadata); 228var binder = CreateBinder(bindingContext.ModelMetadata); 262var binder = CreateBinder(bindingContext.ModelMetadata); 518var binder = CreateBinder(bindingContext.ModelMetadata); 536var binder = CreateBinder(bindingContext.ModelMetadata); 578var binder = CreateBinder(bindingContext.ModelMetadata); 597var binders = bindingContext.ModelMetadata.Properties.ToDictionary( 619var binders = bindingContext.ModelMetadata.Properties.ToDictionary( 657var binder = CreateBinder(bindingContext.ModelMetadata); 684var binder = CreateBinder(bindingContext.ModelMetadata); 709var binder = CreateBinder(bindingContext.ModelMetadata); 736var binder = CreateBinder(bindingContext.ModelMetadata); 762var binder = CreateBinder(bindingContext.ModelMetadata); 786var binder = CreateBinder(bindingContext.ModelMetadata); 818var binder = CreateBinder(bindingContext.ModelMetadata); 852var binder = CreateBinder(bindingContext.ModelMetadata); 883var binder = CreateBinder(bindingContext.ModelMetadata); 903var binder = CreateBinder(bindingContext.ModelMetadata); 925var binder = CreateBinder(bindingContext.ModelMetadata); 947var binder = CreateBinder(bindingContext.ModelMetadata); 974var binder = CreateBinder(bindingContext.ModelMetadata); 1012var binder = CreateBinder(bindingContext.ModelMetadata); 1034var binder = CreateBinder(bindingContext.ModelMetadata); 1058var binder = CreateBinder(bindingContext.ModelMetadata); 1082var binder = CreateBinder(bindingContext.ModelMetadata); 1104var binder = CreateBinder(bindingContext.ModelMetadata); 1143var propertyMetadata = bindingContext.ModelMetadata.Properties[propertyName]; 1146var binder = CreateBinder(bindingContext.ModelMetadata); 1170var binder = CreateBinder(bindingContext.ModelMetadata); 1186var propertyMetadata = bindingContext.ModelMetadata.Properties[nameof(model.DateOfBirth)]; 1189var binder = CreateBinder(bindingContext.ModelMetadata); 1210var propertyMetadata = bindingContext.ModelMetadata.Properties[nameof(model.DateOfDeath)]; 1213var binder = CreateBinder(bindingContext.ModelMetadata); 1231var propertyMetadata = bindingContext.ModelMetadata.Properties[nameof(model.NameNoAttribute)]; 1234var binder = CreateBinder(bindingContext.ModelMetadata);
ModelBinding\Binders\HeaderModelBinderTests.cs (1)
375var metadata = bindingContext.ModelMetadata;
ModelBinding\DefaultModelBindingContextTest.cs (1)
56Assert.Same(newModelMetadata, bindingContext.ModelMetadata);