108 references to ForProperty
Microsoft.AspNetCore.Grpc.Swagger (3)
Internal\GrpcJsonTranscodingDescriptionProvider.cs (3)
112
? ModelMetadataIdentity.
ForProperty
(propertyInfo, MessageDescriptorHelpers.ResolveFieldType(field), field.ContainingType.ClrType)
129
? ModelMetadataIdentity.
ForProperty
(bodyDescriptor.PropertyInfo, bodyDescriptor.PropertyInfo.PropertyType, bodyDescriptor.PropertyInfo.DeclaringType!)
154
? ModelMetadataIdentity.
ForProperty
(propertyInfo, MessageDescriptorHelpers.ResolveFieldType(field), field.ContainingType.ClrType)
Microsoft.AspNetCore.Mvc.Abstractions.Test (1)
ModelBinding\ModelMetadataTest.cs (1)
459
: base(ModelMetadataIdentity.
ForProperty
(propertyInfo, modelType, containerType))
Microsoft.AspNetCore.Mvc.ApiExplorer (1)
EndpointMetadataApiDescriptionProvider.cs (1)
445
return new(ModelMetadataIdentity.
ForProperty
(propertyInfo, type, propertyInfo.DeclaringType));
Microsoft.AspNetCore.Mvc.Core (2)
ModelBinding\Metadata\DefaultModelMetadataProvider.cs (2)
179
ModelMetadataIdentity.
ForProperty
(property, modelType, property.DeclaringType!),
342
var propertyKey = ModelMetadataIdentity.
ForProperty
(
Microsoft.AspNetCore.Mvc.Core.Test (70)
ModelBinding\Metadata\DefaultBindingMetadataProviderTest.cs (15)
162
ModelMetadataIdentity.
ForProperty
(typeof(string).GetProperty(nameof(string.Length)), typeof(int), typeof(string)),
185
ModelMetadataIdentity.
ForProperty
(typeof(string).GetProperty(nameof(string.Length)), typeof(int), typeof(string)),
208
ModelMetadataIdentity.
ForProperty
(typeof(string).GetProperty(nameof(string.Length)), typeof(int), typeof(string)),
231
ModelMetadataIdentity.
ForProperty
(typeof(string).GetProperty(nameof(string.Length)), typeof(int), typeof(string)),
254
ModelMetadataIdentity.
ForProperty
(typeof(string).GetProperty(nameof(string.Length)), typeof(int), typeof(string)),
421
ModelMetadataIdentity.
ForProperty
(typeof(string).GetProperty(nameof(string.Length)), typeof(int), typeof(string)),
439
ModelMetadataIdentity.
ForProperty
(typeof(BindRequiredOnClass).GetProperty(nameof(BindRequiredOnClass.Property)), typeof(int), typeof(BindRequiredOnClass)),
457
ModelMetadataIdentity.
ForProperty
(typeof(BindNeverOnClass).GetProperty(nameof(BindNeverOnClass.Property)), typeof(int), typeof(BindNeverOnClass)),
475
ModelMetadataIdentity.
ForProperty
(typeof(BindNeverOnClass).GetProperty(nameof(BindNeverOnClass.Property)), typeof(int), typeof(BindNeverOnClass)),
498
ModelMetadataIdentity.
ForProperty
(typeof(BindNeverOnClass).GetProperty(nameof(BindNeverOnClass.Property)), typeof(int), typeof(BindNeverOnClass)),
521
ModelMetadataIdentity.
ForProperty
(typeof(BindNeverOnClass).GetProperty(nameof(BindNeverOnClass.Property)), typeof(int), typeof(BindNeverOnClass)),
544
ModelMetadataIdentity.
ForProperty
(typeof(InheritedBindNeverOnClass).GetProperty(nameof(InheritedBindNeverOnClass.Property)), typeof(int), typeof(InheritedBindNeverOnClass)),
567
ModelMetadataIdentity.
ForProperty
(typeof(BindRequiredOnClass).GetProperty(nameof(BindRequiredOnClass.Property)), typeof(int), typeof(BindRequiredOnClass)),
586
ModelMetadataIdentity.
ForProperty
(typeof(BindRequiredOverridesInheritedBindNever).GetProperty(nameof(BindRequiredOverridesInheritedBindNever.Property)), typeof(int), typeof(BindRequiredOverridesInheritedBindNever)),
642
ModelMetadataIdentity.
ForProperty
(typeof(string).GetProperty(nameof(string.Length)), typeof(int), typeof(string)),
ModelBinding\Metadata\DefaultModelMetadataTest.cs (43)
102
var key = ModelMetadataIdentity.
ForProperty
(typeof(Exception).GetProperty(nameof(Exception.Message)), typeof(string), typeof(Exception));
121
var key = ModelMetadataIdentity.
ForProperty
(
158
var key = ModelMetadataIdentity.
ForProperty
(
195
var key = ModelMetadataIdentity.
ForProperty
(
472
ModelMetadataIdentity.
ForProperty
(prop1, typeof(int), typeof(string)),
478
ModelMetadataIdentity.
ForProperty
(prop2, typeof(int), typeof(string)),
1011
var modelIdentity = ModelMetadataIdentity.
ForProperty
(property, property.PropertyType, GetType());
1075
var propertyIdentity = ModelMetadataIdentity.
ForProperty
(property, typeof(int), typeof(TypeWithProperties));
1099
var property1Identity = ModelMetadataIdentity.
ForProperty
(modelType.GetProperty(nameof(TypeWithProperties.PublicGetPublicSetProperty)), typeof(int), modelType);
1102
var property2Identity = ModelMetadataIdentity.
ForProperty
(modelType.GetProperty(nameof(TypeWithProperties.PublicGetProtectedSetProperty)), typeof(int), modelType);
1126
var propertyIdentity = ModelMetadataIdentity.
ForProperty
(modelType.GetProperty(nameof(TypeWithProperties.PublicGetPublicSetProperty)), typeof(int), modelType);
1150
var property1Identity = ModelMetadataIdentity.
ForProperty
(modelType.GetProperty(nameof(TypeWithProperties.PublicGetPublicSetProperty)), typeof(int), modelType);
1153
var property2Identity = ModelMetadataIdentity.
ForProperty
(modelType.GetProperty(nameof(TypeWithProperties.PublicGetProtectedSetProperty)), typeof(int), modelType);
1177
var employeeId = ModelMetadataIdentity.
ForProperty
(modelType.GetProperty(nameof(Employee.Id)), typeof(int), modelType);
1179
var employeeUnit = ModelMetadataIdentity.
ForProperty
(modelType.GetProperty(nameof(Employee.Unit)), typeof(BusinessUnit), modelType);
1181
var employeeManager = ModelMetadataIdentity.
ForProperty
(modelType.GetProperty(nameof(Employee.Manager)), typeof(Employee), modelType);
1183
var employeeEmployees = ModelMetadataIdentity.
ForProperty
(modelType.GetProperty(nameof(Employee.Employees)), typeof(List<Employee>), modelType);
1187
var unitHead = ModelMetadataIdentity.
ForProperty
(unitModel.GetProperty(nameof(BusinessUnit.Head)), typeof(Employee), unitModel);
1189
var unitId = ModelMetadataIdentity.
ForProperty
(unitModel.GetProperty(nameof(BusinessUnit.Id)), typeof(int), unitModel);
1218
var employeeId = ModelMetadataIdentity.
ForProperty
(modelType.GetProperty(nameof(Employee.Id)), typeof(int), modelType);
1220
var employeeUnit = ModelMetadataIdentity.
ForProperty
(modelType.GetProperty(nameof(Employee.Unit)), typeof(BusinessUnit), modelType);
1222
var employeeManager = ModelMetadataIdentity.
ForProperty
(modelType.GetProperty(nameof(Employee.Manager)), typeof(Employee), modelType);
1224
var employeeEmployees = ModelMetadataIdentity.
ForProperty
(modelType.GetProperty(nameof(Employee.Employees)), typeof(List<Employee>), modelType);
1228
var unitHead = ModelMetadataIdentity.
ForProperty
(unitModel.GetProperty(nameof(BusinessUnit.Head)), typeof(Employee), unitModel);
1230
var unitId = ModelMetadataIdentity.
ForProperty
(unitModel.GetProperty(nameof(BusinessUnit.Id)), typeof(int), unitModel);
1261
var employeeId = ModelMetadataIdentity.
ForProperty
(modelType.GetProperty(nameof(Employee.Id)), typeof(int), modelType);
1263
var employeeEmployees = ModelMetadataIdentity.
ForProperty
(modelType.GetProperty(nameof(Employee.Employees)), typeof(List<Employee>), modelType);
1290
var employeeId = ModelMetadataIdentity.
ForProperty
(modelType.GetProperty(nameof(Employee.Id)), typeof(int), modelType);
1292
var employeeUnit = ModelMetadataIdentity.
ForProperty
(modelType.GetProperty(nameof(Employee.Unit)), typeof(BusinessUnit), modelType);
1294
var employeeManager = ModelMetadataIdentity.
ForProperty
(modelType.GetProperty(nameof(Employee.Manager)), typeof(Employee), modelType);
1296
var employeeEmployeesId = ModelMetadataIdentity.
ForProperty
(modelType.GetProperty(nameof(Employee.Employees)), typeof(List<Employee>), modelType);
1300
var unitHead = ModelMetadataIdentity.
ForProperty
(unitModel.GetProperty(nameof(BusinessUnit.Head)), typeof(Employee), unitModel);
1302
var unitId = ModelMetadataIdentity.
ForProperty
(unitModel.GetProperty(nameof(BusinessUnit.Id)), typeof(int), unitModel);
1338
var propertyId = ModelMetadataIdentity.
ForProperty
(modelType.GetProperty(nameof(SimpleRecordType.Property)), typeof(int), modelType);
1382
var propertyId = ModelMetadataIdentity.
ForProperty
(modelType.GetProperty(nameof(SimpleRecordType.Property)), typeof(int), modelType);
1427
var propertyId = ModelMetadataIdentity.
ForProperty
(modelType.GetProperty(nameof(SimpleRecordTypeWithProperty.Property)), typeof(int), modelType);
1431
var property2Id = ModelMetadataIdentity.
ForProperty
(modelType.GetProperty(nameof(SimpleRecordTypeWithProperty.Property2)), typeof(int), modelType);
1472
var propertyId = ModelMetadataIdentity.
ForProperty
(modelType.GetProperty(nameof(SimpleRecordTypeWithProperty.Property)), typeof(int), modelType);
1476
var property2Id = ModelMetadataIdentity.
ForProperty
(modelType.GetProperty(nameof(SimpleRecordTypeWithProperty.Property2)), typeof(int), modelType);
1517
var propertyId = ModelMetadataIdentity.
ForProperty
(modelType.GetProperty(nameof(SimpleRecordTypeWithProperty.Property)), typeof(int), modelType);
1521
var property2Id = ModelMetadataIdentity.
ForProperty
(modelType.GetProperty(nameof(SimpleRecordTypeWithProperty.Property2)), typeof(int), modelType);
1562
var propertyId = ModelMetadataIdentity.
ForProperty
(modelType.GetProperty(nameof(SimpleRecordTypeWithProperty.Property)), typeof(int), modelType);
1565
var property2Id = ModelMetadataIdentity.
ForProperty
(modelType.GetProperty(nameof(SimpleRecordTypeWithProperty.Property2)), typeof(int), modelType);
ModelBinding\Metadata\DefaultValidationMetadataProviderTest.cs (7)
17
var key = ModelMetadataIdentity.
ForProperty
(typeof(string).GetProperty(nameof(string.Length)), typeof(int), typeof(string));
37
var key = ModelMetadataIdentity.
ForProperty
(typeof(string).GetProperty(nameof(string.Length)), typeof(int), typeof(string));
70
var key = ModelMetadataIdentity.
ForProperty
(
92
var key = ModelMetadataIdentity.
ForProperty
(
116
var key = ModelMetadataIdentity.
ForProperty
(typeof(string).GetProperty(nameof(string.Length)), typeof(int), typeof(string));
135
var key = ModelMetadataIdentity.
ForProperty
(typeof(string).GetProperty(nameof(string.Length)), typeof(int), typeof(string));
154
var key = ModelMetadataIdentity.
ForProperty
(typeof(string).GetProperty(nameof(string.Length)), typeof(int), typeof(string));
ModelBinding\Metadata\ExcludeBindingMetadataProviderTest.cs (2)
16
var key = ModelMetadataIdentity.
ForProperty
(
40
var key = ModelMetadataIdentity.
ForProperty
(
ModelBinding\Metadata\SystemTextJsonValidationMetadataProviderTest.cs (3)
17
var key = ModelMetadataIdentity.
ForProperty
(typeof(SampleTestClass).GetProperty(nameof(SampleTestClass.NoAttributesProperty)), typeof(int), typeof(SampleTestClass));
35
var key = ModelMetadataIdentity.
ForProperty
(typeof(SampleTestClass).GetProperty(propertyName), typeof(int), typeof(SampleTestClass));
70
var key = ModelMetadataIdentity.
ForProperty
(typeof(SampleTestClass).GetProperty(propertyName), typeof(int), typeof(SampleTestClass));
Microsoft.AspNetCore.Mvc.Core.TestCommon (1)
TestModelMetadataProvider.cs (1)
123
var key = ModelMetadataIdentity.
ForProperty
(property, property.PropertyType, containerType);
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (27)
DataAnnotationsMetadataProviderTest.cs (23)
1112
var key = ModelMetadataIdentity.
ForProperty
(property, typeof(int), typeof(string));
1133
var key = ModelMetadataIdentity.
ForProperty
(property, typeof(int), typeof(string));
1153
var key = ModelMetadataIdentity.
ForProperty
(
1178
var key = ModelMetadataIdentity.
ForProperty
(
1207
var key = ModelMetadataIdentity.
ForProperty
(
1232
var key = ModelMetadataIdentity.
ForProperty
(property, property.PropertyType, modelType);
1251
var key = ModelMetadataIdentity.
ForProperty
(property, property.PropertyType, modelType);
1270
var key = ModelMetadataIdentity.
ForProperty
(property, property.PropertyType, modelType);
1291
var key = ModelMetadataIdentity.
ForProperty
(property, property.PropertyType, modelType);
1311
var key = ModelMetadataIdentity.
ForProperty
(property, property.PropertyType, modelType);
1330
var key = ModelMetadataIdentity.
ForProperty
(property, property.PropertyType, modelType);
1349
var key = ModelMetadataIdentity.
ForProperty
(property, property.PropertyType, modelType);
1368
var key = ModelMetadataIdentity.
ForProperty
(property, property.PropertyType, modelType);
1456
var key = ModelMetadataIdentity.
ForProperty
(property, typeof(int), typeof(string));
1484
var key = ModelMetadataIdentity.
ForProperty
(property, typeof(int), typeof(string));
1506
var key = ModelMetadataIdentity.
ForProperty
(property, typeof(int), typeof(string));
1526
var key = ModelMetadataIdentity.
ForProperty
(property, typeof(int), typeof(string));
1546
var key = ModelMetadataIdentity.
ForProperty
(property, typeof(int), typeof(string));
1567
var key = ModelMetadataIdentity.
ForProperty
(property, typeof(int), typeof(string));
1585
var key = ModelMetadataIdentity.
ForProperty
(property, type, type);
1601
var key = ModelMetadataIdentity.
ForProperty
(property, type, type);
1618
var key = ModelMetadataIdentity.
ForProperty
(property, type, type);
1637
var key = ModelMetadataIdentity.
ForProperty
(property, type, type);
DataMemberRequiredBindingMetadataProviderTest.cs (4)
23
var key = ModelMetadataIdentity.
ForProperty
(
49
var key = ModelMetadataIdentity.
ForProperty
(
97
var key = ModelMetadataIdentity.
ForProperty
(
125
var key = ModelMetadataIdentity.
ForProperty
(
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (3)
NewtonsoftJsonValidationMetadataProviderTest.cs (3)
19
var key = ModelMetadataIdentity.
ForProperty
(typeof(SampleTestClass).GetProperty(nameof(SampleTestClass.NoAttributesProperty)), typeof(int), typeof(SampleTestClass));
37
var key = ModelMetadataIdentity.
ForProperty
(typeof(SampleTestClass).GetProperty(propertyName), typeof(int), typeof(SampleTestClass));
56
var key = ModelMetadataIdentity.
ForProperty
(typeof(SampleTestClass).GetProperty(propertyName), typeof(int), typeof(SampleTestClass));