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