94 references to
Microsoft.AspNetCore.Mvc.Core (3)
ModelBinding\Binders\DictionaryModelBinder.cs (1)
159
var valueMetadata = elementMetadata.Properties
[
nameof(KeyValuePair<TKey, TValue>.Value)]!;
ModelBinding\Binders\KeyValuePairModelBinder.cs (1)
96
var propertyModelMetadata = bindingContext.ModelMetadata.Properties
[
propertyName]!;
ModelBinding\ModelMetadataProviderExtensions.cs (1)
34
var propertyMetadata = containerMetadata.Properties
[
propertyName];
Microsoft.AspNetCore.Mvc.Core.Test (79)
ControllerBaseTest.cs (31)
2621
Assert.True(context.PropertyFilter(context.ModelMetadata.Properties
[
"Property1"]));
2622
Assert.True(context.PropertyFilter(context.ModelMetadata.Properties
[
"Property2"]));
2649
Assert.True(context.PropertyFilter(context.ModelMetadata.Properties
[
"Property1"]));
2650
Assert.True(context.PropertyFilter(context.ModelMetadata.Properties
[
"Property2"]));
2676
Assert.True(context.PropertyFilter(context.ModelMetadata.Properties
[
"Property1"]));
2677
Assert.True(context.PropertyFilter(context.ModelMetadata.Properties
[
"Property2"]));
2730
Assert.True(context.PropertyFilter(context.ModelMetadata.Properties
[
"Include1"]));
2731
Assert.True(context.PropertyFilter(context.ModelMetadata.Properties
[
"Include2"]));
2733
Assert.False(context.PropertyFilter(context.ModelMetadata.Properties
[
"Exclude1"]));
2734
Assert.False(context.PropertyFilter(context.ModelMetadata.Properties
[
"Exclude2"]));
2763
Assert.True(context.PropertyFilter(context.ModelMetadata.Properties
[
"Include1"]));
2764
Assert.True(context.PropertyFilter(context.ModelMetadata.Properties
[
"Include2"]));
2766
Assert.False(context.PropertyFilter(context.ModelMetadata.Properties
[
"Exclude1"]));
2767
Assert.False(context.PropertyFilter(context.ModelMetadata.Properties
[
"Exclude2"]));
2797
Assert.True(context.PropertyFilter(context.ModelMetadata.Properties
[
"Property1"]));
2798
Assert.True(context.PropertyFilter(context.ModelMetadata.Properties
[
"Property2"]));
2800
Assert.False(context.PropertyFilter(context.ModelMetadata.Properties
[
"Exclude1"]));
2801
Assert.False(context.PropertyFilter(context.ModelMetadata.Properties
[
"Exclude2"]));
2829
Assert.True(context.PropertyFilter(context.ModelMetadata.Properties
[
"Property1"]));
2830
Assert.True(context.PropertyFilter(context.ModelMetadata.Properties
[
"Property2"]));
2832
Assert.False(context.PropertyFilter(context.ModelMetadata.Properties
[
"Exclude1"]));
2833
Assert.False(context.PropertyFilter(context.ModelMetadata.Properties
[
"Exclude2"]));
2865
var modelMetadata = context.ModelMetadata.Properties
[
propertyName];
2913
Assert.True(context.PropertyFilter(context.ModelMetadata.Properties
[
"Include1"]));
2914
Assert.True(context.PropertyFilter(context.ModelMetadata.Properties
[
"Include2"]));
2916
Assert.False(context.PropertyFilter(context.ModelMetadata.Properties
[
"Exclude1"]));
2917
Assert.False(context.PropertyFilter(context.ModelMetadata.Properties
[
"Exclude2"]));
2945
Assert.True(context.PropertyFilter(context.ModelMetadata.Properties
[
"Property1"]));
2946
Assert.True(context.PropertyFilter(context.ModelMetadata.Properties
[
"Property2"]));
2973
Assert.True(context.PropertyFilter(context.ModelMetadata.Properties
[
"Property1"]));
2974
Assert.True(context.PropertyFilter(context.ModelMetadata.Properties
[
"Property2"]));
ModelBinding\Binders\ComplexObjectModelBinderTest.cs (10)
844
var firstNameProperty = containerMetadata.Properties
[
nameof(model.FirstName)];
847
var lastNameProperty = containerMetadata.Properties
[
nameof(model.LastName)];
869
var propertyMetadata = metadata.Properties
[
nameof(model.PropertyWithDefaultValue)];
891
var propertyMetadata = metadata.Properties
[
nameof(model.PropertyWithInitializedValue)];
915
var propertyMetadata = metadata.Properties
[
nameof(model.PropertyWithInitializedValueAndDefault)];
939
var propertyMetadata = metadata.Properties
[
nameof(model.NonUpdateableProperty)];
981
var propertyMetadata = bindingContext.ModelMetadata.Properties
[
propertyName];
1024
var propertyMetadata = bindingContext.ModelMetadata.Properties
[
nameof(model.DateOfBirth)];
1048
var propertyMetadata = bindingContext.ModelMetadata.Properties
[
nameof(model.DateOfDeath)];
1069
var propertyMetadata = bindingContext.ModelMetadata.Properties
[
nameof(model.NameNoAttribute)];
ModelBinding\Binders\ComplexTypeModelBinderTest.cs (10)
981
var firstNameProperty = containerMetadata.Properties
[
nameof(model.FirstName)];
984
var lastNameProperty = containerMetadata.Properties
[
nameof(model.LastName)];
1031
var propertyMetadata = metadata.Properties
[
nameof(model.PropertyWithDefaultValue)];
1053
var propertyMetadata = metadata.Properties
[
nameof(model.PropertyWithInitializedValue)];
1077
var propertyMetadata = metadata.Properties
[
nameof(model.PropertyWithInitializedValueAndDefault)];
1101
var propertyMetadata = metadata.Properties
[
nameof(model.NonUpdateableProperty)];
1143
var propertyMetadata = bindingContext.ModelMetadata.Properties
[
propertyName];
1186
var propertyMetadata = bindingContext.ModelMetadata.Properties
[
nameof(model.DateOfBirth)];
1210
var propertyMetadata = bindingContext.ModelMetadata.Properties
[
nameof(model.DateOfDeath)];
1231
var propertyMetadata = bindingContext.ModelMetadata.Properties
[
nameof(model.NameNoAttribute)];
ModelBinding\Binders\DictionaryModelBinderTest.cs (2)
348
{ valueMetadata.Properties
[
"Id"], new SimpleTypeModelBinder(typeof(int), NullLoggerFactory.Instance) },
349
{ valueMetadata.Properties
[
"Name"], new SimpleTypeModelBinder(typeof(string), NullLoggerFactory.Instance) },
ModelBinding\Metadata\DefaultModelMetadataTest.cs (3)
763
var isReadOnly = metadata.Properties
[
"PublicGetPrivateSetProperty"].IsReadOnly;
782
var isReadOnly = metadata.Properties
[
"PublicGetProtectedSetProperty"].IsReadOnly;
801
var isReadOnly = metadata.Properties
[
"PublicGetPublicSetProperty"].IsReadOnly;
ModelBinding\ModelBinderFactoryTest.cs (9)
74
Assert.NotNull(c.CreateBinder(c.Metadata.Properties
[
nameof(Widget.Id)]));
149
Assert.NotNull(c.CreateBinder(c.Metadata.Properties
[
nameof(Widget.Id)]));
190
var binder = c.CreateBinder(c.Metadata.Properties
[
nameof(Employee.Manager)]);
403
var binder = c.CreateBinder(c.Metadata.Properties
[
nameof(Widget.Id)]);
464
var binder = c.CreateBinder(c.Metadata.Properties
[
nameof(Widget.Id)]);
528
inner = c.CreateBinder(c.Metadata.Properties
[
nameof(Widget.Id)]);
558
context.Metadata = context.Metadata.Properties
[
nameof(Widget.Id)];
591
inner = c.CreateBinder(c.Metadata.Properties
[
nameof(Widget.Id)]);
622
context.Metadata = context.Metadata.Properties
[
nameof(Widget.Id)];
ModelBinding\Validation\ClientValidatorCacheTest.cs (2)
72
var property = metadata.Properties
[
nameof(TestRecordType.Property1)];
93
var property = metadata.Properties
[
nameof(TestRecordTypeWithProperty.Property2)];
ModelBinding\Validation\DefaultComplexObjectValidationStrategyTest.cs (12)
36
Assert.Same(metadata.Properties
[
"Age"], entry.Metadata);
42
Assert.Same(metadata.Properties
[
"Id"], entry.Metadata);
48
Assert.Same(metadata.Properties
[
"Name"], entry.Metadata);
76
Assert.Same(metadata.Properties
[
"Age"], entry.Metadata);
82
Assert.Same(metadata.Properties
[
"Id"], entry.Metadata);
88
Assert.Same(metadata.Properties
[
"Name"], entry.Metadata);
110
Assert.Same(metadata.Properties
[
"Age"], entry.Metadata);
116
Assert.Same(metadata.Properties
[
"Id"], entry.Metadata);
122
Assert.Same(metadata.Properties
[
"Name"], entry.Metadata);
145
Assert.Same(metadata.Properties
[
"Age"], entry.Metadata);
151
Assert.Same(metadata.Properties
[
"Id"], entry.Metadata);
157
Assert.Same(metadata.Properties
[
"Name"], entry.Metadata);
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (5)
ModelMetadataProviderTest.cs (5)
92
var property = metadata.Properties
[
"DirectlyHidden"];
107
var property = metadata.Properties
[
"OfHiddenType"];
122
var property = metadata.Properties
[
"DirectlyHidden"];
137
var property = metadata.Properties
[
"OfHiddenType"];
795
Assert.Null(metadata.Properties
[
propertyName]);
Microsoft.AspNetCore.Mvc.IntegrationTests (2)
ValidationIntegrationTests.cs (1)
1547
var otherProperty = parentEntry.Metadata.Properties
[
_otherProperty];
ValidationWithRecordIntegrationTests.cs (1)
1357
var otherProperty = parentEntry.Metadata.Properties
[
_otherProperty];
Microsoft.AspNetCore.Mvc.NewtonsoftJson (1)
NewtonsoftJsonInputFormatter.cs (1)
400
var propertyMetadata = metadata.Properties
[
propertyName];
Microsoft.AspNetCore.Mvc.ViewFeatures (4)
ExpressionMetadataProvider.cs (2)
102
metadata = metadataProvider.GetMetadataForType(containerType).Properties
[
propertyName];
177
var propertyMetadata = containerMetadata.Properties
[
viewDataInfo.PropertyInfo.Name];
ModelExplorer.cs (2)
266
var propertyMetadata = metadata.Properties
[
name];
291
var propertyMetadata = metadata.Properties
[
name];