5 instantiations of ModelMetadataIdentity
Microsoft.AspNetCore.Mvc.Abstractions (5)
ModelBinding\Metadata\ModelMetadataIdentity.cs (5)
36return new ModelMetadataIdentity(modelType); 56return new ModelMetadataIdentity(modelType, name, containerType); 75return new ModelMetadataIdentity(modelType, propertyInfo.Name, containerType, fieldInfo: propertyInfo); 98return new ModelMetadataIdentity(modelType, parameter.Name, fieldInfo: parameter); 113return new ModelMetadataIdentity(modelType, constructor.Name, constructorInfo: constructor);
488 references to ModelMetadataIdentity
Microsoft.AspNetCore.Grpc.Swagger (12)
Internal\GrpcJsonTranscodingDescriptionProvider.cs (11)
83ModelMetadata = new GrpcModelMetadata(ModelMetadataIdentity.ForType(responseType)), 89ModelMetadata = new GrpcModelMetadata(ModelMetadataIdentity.ForType(typeof(Google.Rpc.Status))), 111var identity = propertyInfo != null 112? ModelMetadataIdentity.ForProperty(propertyInfo, MessageDescriptorHelpers.ResolveFieldType(field), field.ContainingType.ClrType) 113: ModelMetadataIdentity.ForType(MessageDescriptorHelpers.ResolveFieldType(field)); 128var identity = bodyDescriptor.PropertyInfo != null 129? ModelMetadataIdentity.ForProperty(bodyDescriptor.PropertyInfo, bodyDescriptor.PropertyInfo.PropertyType, bodyDescriptor.PropertyInfo.DeclaringType!) 130: ModelMetadataIdentity.ForType(bodyDescriptor.Descriptor.ClrType); 153var identity = propertyInfo != null 154? ModelMetadataIdentity.ForProperty(propertyInfo, MessageDescriptorHelpers.ResolveFieldType(field), field.ContainingType.ClrType) 155: ModelMetadataIdentity.ForType(MessageDescriptorHelpers.ResolveFieldType(field));
Internal\GrpcModelMetadata.cs (1)
13public GrpcModelMetadata(ModelMetadataIdentity identity) : base(identity)
Microsoft.AspNetCore.Mvc.Abstractions (24)
ModelBinding\Metadata\ModelMetadataIdentity.cs (21)
11public readonly struct ModelMetadataIdentity : IEquatable<ModelMetadataIdentity> 28/// Creates a <see cref="ModelMetadataIdentity"/> for the provided model <see cref="Type"/>. 31/// <returns>A <see cref="ModelMetadataIdentity"/>.</returns> 32public static ModelMetadataIdentity ForType(Type modelType) 40/// Creates a <see cref="ModelMetadataIdentity"/> for the provided property. 45/// <returns>A <see cref="ModelMetadataIdentity"/>.</returns> 47public static ModelMetadataIdentity ForProperty( 60/// Creates a <see cref="ModelMetadataIdentity"/> for the provided property. 65/// <returns>A <see cref="ModelMetadataIdentity"/>.</returns> 66public static ModelMetadataIdentity ForProperty( 79/// Creates a <see cref="ModelMetadataIdentity"/> for the provided parameter. 82/// <returns>A <see cref="ModelMetadataIdentity"/>.</returns> 83public static ModelMetadataIdentity ForParameter(ParameterInfo parameter) 87/// Creates a <see cref="ModelMetadataIdentity"/> for the provided parameter with the specified 92/// <returns>A <see cref="ModelMetadataIdentity"/>.</returns> 93public static ModelMetadataIdentity ForParameter(ParameterInfo parameter, Type modelType) 102/// Creates a <see cref="ModelMetadataIdentity"/> for the provided parameter with the specified 107/// <returns>A <see cref="ModelMetadataIdentity"/>.</returns> 108public static ModelMetadataIdentity ForConstructor(ConstructorInfo constructor, Type modelType) 180public bool Equals(ModelMetadataIdentity other) 194var other = obj as ModelMetadataIdentity?;
ModelBinding\ModelMetadata.cs (3)
54/// <param name="identity">The <see cref="ModelMetadataIdentity"/>.</param> 55protected ModelMetadata(ModelMetadataIdentity identity) 112protected internal ModelMetadataIdentity Identity { get; }
Microsoft.AspNetCore.Mvc.Abstractions.Test (3)
ModelBinding\ModelMetadataTest.cs (3)
449: base(ModelMetadataIdentity.ForType(modelType)) 454: base(ModelMetadataIdentity.ForParameter(parameter)) 459: base(ModelMetadataIdentity.ForProperty(propertyInfo, modelType, containerType))
Microsoft.AspNetCore.Mvc.ApiExplorer (4)
EndpointMetadataApiDescriptionProvider.cs (3)
437new(ModelMetadataIdentity.ForType(type)); 445return new(ModelMetadataIdentity.ForProperty(propertyInfo, type, propertyInfo.DeclaringType)); 447return new(ModelMetadataIdentity.ForParameter(parameterInfo, type));
EndpointModelMetadata.cs (1)
13public EndpointModelMetadata(ModelMetadataIdentity identity) : base(identity)
Microsoft.AspNetCore.Mvc.Core (40)
ModelBinding\Metadata\BindingMetadataProviderContext.cs (4)
16/// <param name="key">The <see cref="ModelMetadataIdentity"/> for the <see cref="ModelMetadata"/>.</param> 19ModelMetadataIdentity key, 39/// Gets the <see cref="ModelMetadataIdentity"/>. 41public ModelMetadataIdentity Key { get; }
ModelBinding\Metadata\DefaultMetadataDetails.cs (4)
19/// <param name="key">The <see cref="ModelMetadataIdentity"/>.</param> 21public DefaultMetadataDetails(ModelMetadataIdentity key, ModelAttributes attributes) 45/// Gets or sets the <see cref="ModelMetadataIdentity"/>. 47public ModelMetadataIdentity Key { get; }
ModelBinding\Metadata\DefaultModelMetadataProvider.cs (24)
20private readonly ConcurrentDictionary<ModelMetadataIdentity, ModelMetadataCacheEntry> _modelMetadataCache = new(); 21private readonly Func<ModelMetadataIdentity, ModelMetadataCacheEntry> _cacheEntryFactory; 82var key = ModelMetadataIdentity.ForType(modelType); 161var key = ModelMetadataIdentity.ForType(modelType); 172ModelMetadataIdentity.ForParameter(parameter, modelType), 179ModelMetadataIdentity.ForProperty(property, modelType, property.DeclaringType!), 186ModelMetadataIdentity.ForConstructor(constructor, modelType), 190private ModelMetadataCacheEntry CreateCacheEntry(ModelMetadataIdentity key) 215private static DefaultMetadataDetails CreateSinglePropertyDetails(ModelMetadataIdentity propertyKey) 231private DefaultMetadataDetails CreateConstructorDetails(ModelMetadataIdentity constructorKey) 241var parameterDetails = CreateParameterDetails(ModelMetadataIdentity.ForParameter(parameter)); 300var key = ModelMetadataIdentity.ForType(typeof(object)); 325/// The <see cref="ModelMetadataIdentity"/> identifying the model <see cref="Type"/>. 333protected virtual DefaultMetadataDetails[] CreatePropertyDetails(ModelMetadataIdentity key) 342var propertyKey = ModelMetadataIdentity.ForProperty( 355ModelMetadataIdentity propertyKey, 387/// The <see cref="ModelMetadataIdentity"/> identifying the model <see cref="Type"/>. 395protected virtual DefaultMetadataDetails CreateTypeDetails(ModelMetadataIdentity key) 406/// The <see cref="ModelMetadataIdentity"/> identifying the parameter <see cref="Type"/>. 409protected virtual DefaultMetadataDetails CreateParameterDetails(ModelMetadataIdentity key)
ModelBinding\Metadata\DisplayMetadataProviderContext.cs (4)
16/// <param name="key">The <see cref="ModelMetadataIdentity"/> for the <see cref="ModelMetadata"/>.</param> 19ModelMetadataIdentity key, 43/// Gets the <see cref="ModelMetadataIdentity"/>. 45public ModelMetadataIdentity Key { get; }
ModelBinding\Metadata\ValidationMetadataProviderContext.cs (4)
16/// <param name="key">The <see cref="ModelMetadataIdentity"/> for the <see cref="ModelMetadata"/>.</param> 19ModelMetadataIdentity key, 39/// Gets the <see cref="ModelMetadataIdentity"/>. 41public ModelMetadataIdentity Key { get; }
Microsoft.AspNetCore.Mvc.Core.Test (269)
BindAttributeTest.cs (2)
28var identity = ModelMetadataIdentity.ForProperty(typeof(int), property, typeof(string));
Controllers\ControllerBinderDelegateProviderTest.cs (1)
1456: base(ModelMetadataIdentity.ForType(typeof(string)))
ModelBinding\Metadata\BindingSourceMetadataProviderTests.cs (2)
14var key = ModelMetadataIdentity.ForType(typeof(Test));
ModelBinding\Metadata\DefaultBindingMetadataProviderTest.cs (28)
22ModelMetadataIdentity.ForType(typeof(string)), 46ModelMetadataIdentity.ForType(typeof(string)), 69ModelMetadataIdentity.ForType(typeof(string)), 93ModelMetadataIdentity.ForType(typeof(string)), 116ModelMetadataIdentity.ForType(typeof(string)), 140ModelMetadataIdentity.ForType(typeof(string)), 162ModelMetadataIdentity.ForProperty(typeof(string).GetProperty(nameof(string.Length)), typeof(int), typeof(string)), 185ModelMetadataIdentity.ForProperty(typeof(string).GetProperty(nameof(string.Length)), typeof(int), typeof(string)), 208ModelMetadataIdentity.ForProperty(typeof(string).GetProperty(nameof(string.Length)), typeof(int), typeof(string)), 231ModelMetadataIdentity.ForProperty(typeof(string).GetProperty(nameof(string.Length)), typeof(int), typeof(string)), 254ModelMetadataIdentity.ForProperty(typeof(string).GetProperty(nameof(string.Length)), typeof(int), typeof(string)), 277ModelMetadataIdentity.ForParameter(ParameterInfos.SampleParameterInfo), 300ModelMetadataIdentity.ForParameter(ParameterInfos.SampleParameterInfo), 323ModelMetadataIdentity.ForParameter(ParameterInfos.SampleParameterInfo), 346ModelMetadataIdentity.ForParameter(ParameterInfos.SampleParameterInfo), 369ModelMetadataIdentity.ForParameter(ParameterInfos.SampleParameterInfo), 393ModelMetadataIdentity.ForParameter(ParameterInfos.SampleParameterInfo), 421ModelMetadataIdentity.ForProperty(typeof(string).GetProperty(nameof(string.Length)), typeof(int), typeof(string)), 439ModelMetadataIdentity.ForProperty(typeof(BindRequiredOnClass).GetProperty(nameof(BindRequiredOnClass.Property)), typeof(int), typeof(BindRequiredOnClass)), 457ModelMetadataIdentity.ForProperty(typeof(BindNeverOnClass).GetProperty(nameof(BindNeverOnClass.Property)), typeof(int), typeof(BindNeverOnClass)), 475ModelMetadataIdentity.ForProperty(typeof(BindNeverOnClass).GetProperty(nameof(BindNeverOnClass.Property)), typeof(int), typeof(BindNeverOnClass)), 498ModelMetadataIdentity.ForProperty(typeof(BindNeverOnClass).GetProperty(nameof(BindNeverOnClass.Property)), typeof(int), typeof(BindNeverOnClass)), 521ModelMetadataIdentity.ForProperty(typeof(BindNeverOnClass).GetProperty(nameof(BindNeverOnClass.Property)), typeof(int), typeof(BindNeverOnClass)), 544ModelMetadataIdentity.ForProperty(typeof(InheritedBindNeverOnClass).GetProperty(nameof(InheritedBindNeverOnClass.Property)), typeof(int), typeof(InheritedBindNeverOnClass)), 567ModelMetadataIdentity.ForProperty(typeof(BindRequiredOnClass).GetProperty(nameof(BindRequiredOnClass.Property)), typeof(int), typeof(BindRequiredOnClass)), 586ModelMetadataIdentity.ForProperty(typeof(BindRequiredOverridesInheritedBindNever).GetProperty(nameof(BindRequiredOverridesInheritedBindNever.Property)), typeof(int), typeof(BindRequiredOverridesInheritedBindNever)), 611ModelMetadataIdentity.ForType(typeof(string)), 642ModelMetadataIdentity.ForProperty(typeof(string).GetProperty(nameof(string.Length)), typeof(int), typeof(string)),
ModelBinding\Metadata\DefaultModelMetadataTest.cs (195)
23var key = ModelMetadataIdentity.ForType(typeof(string)); 83var key = ModelMetadataIdentity.ForType(typeof(Exception)); 102var key = ModelMetadataIdentity.ForProperty(typeof(Exception).GetProperty(nameof(Exception.Message)), typeof(string), typeof(Exception)); 121var key = ModelMetadataIdentity.ForProperty( 158var key = ModelMetadataIdentity.ForProperty( 195var key = ModelMetadataIdentity.ForProperty( 236var key = ModelMetadataIdentity.ForType(modelType); 263var key = ModelMetadataIdentity.ForType(modelType); 297var key = ModelMetadataIdentity.ForType(modelType); 324var key = ModelMetadataIdentity.ForType(modelType); 357var key = ModelMetadataIdentity.ForType(modelType); 380var key = ModelMetadataIdentity.ForType(modelType); 401var key = ModelMetadataIdentity.ForType(modelType.MakeByRefType()); 423var key = ModelMetadataIdentity.ForType(modelType); 444var key = ModelMetadataIdentity.ForType(modelType); 472ModelMetadataIdentity.ForProperty(prop1, typeof(int), typeof(string)), 478ModelMetadataIdentity.ForProperty(prop2, typeof(int), typeof(string)), 486var key = ModelMetadataIdentity.ForType(typeof(string)); 549ModelMetadataIdentity.ForProperty(typeof(int), originalName, typeof(string)), 558var key = ModelMetadataIdentity.ForType(typeof(string)); 651ModelMetadataIdentity.ForProperty(typeof(int), kvp.Key, typeof(string)), 670var key = ModelMetadataIdentity.ForType(typeof(string)); 690var key = ModelMetadataIdentity.ForType(typeof(string)); 711var key = ModelMetadataIdentity.ForType(typeof(string)); 732var key = ModelMetadataIdentity.ForType(typeof(int[])); 757var key = ModelMetadataIdentity.ForType(typeof(TypeWithProperties)); 776var key = ModelMetadataIdentity.ForType(typeof(TypeWithProperties)); 795var key = ModelMetadataIdentity.ForType(typeof(TypeWithProperties)); 819var key = ModelMetadataIdentity.ForType(modelType); 846var key = ModelMetadataIdentity.ForType(modelType); 878var key = ModelMetadataIdentity.ForType(typeof(int)); 903var key = ModelMetadataIdentity.ForType(typeof(int)); 928var key = ModelMetadataIdentity.ForType(typeof(XmlDocument)); 951var key = ModelMetadataIdentity.ForType(typeof(string)); 971var key = ModelMetadataIdentity.ForType(typeof(string)); 993var modelIdentity = ModelMetadataIdentity.ForParameter(parameter); 1011var modelIdentity = ModelMetadataIdentity.ForProperty(property, property.PropertyType, GetType()); 1027var modelIdentity = ModelMetadataIdentity.ForType(typeof(string)); 1041var modelIdentity = ModelMetadataIdentity.ForType(typeof(string)); 1055var modelIdentity = ModelMetadataIdentity.ForType(typeof(string)); 1070var modelIdentity = ModelMetadataIdentity.ForType(modelType); 1075var propertyIdentity = ModelMetadataIdentity.ForProperty(property, typeof(int), typeof(TypeWithProperties)); 1095var modelIdentity = ModelMetadataIdentity.ForType(modelType); 1099var property1Identity = ModelMetadataIdentity.ForProperty(modelType.GetProperty(nameof(TypeWithProperties.PublicGetPublicSetProperty)), typeof(int), modelType); 1102var property2Identity = ModelMetadataIdentity.ForProperty(modelType.GetProperty(nameof(TypeWithProperties.PublicGetProtectedSetProperty)), typeof(int), modelType); 1122var modelIdentity = ModelMetadataIdentity.ForType(modelType); 1126var propertyIdentity = ModelMetadataIdentity.ForProperty(modelType.GetProperty(nameof(TypeWithProperties.PublicGetPublicSetProperty)), typeof(int), modelType); 1146var modelIdentity = ModelMetadataIdentity.ForType(modelType); 1150var property1Identity = ModelMetadataIdentity.ForProperty(modelType.GetProperty(nameof(TypeWithProperties.PublicGetPublicSetProperty)), typeof(int), modelType); 1153var property2Identity = ModelMetadataIdentity.ForProperty(modelType.GetProperty(nameof(TypeWithProperties.PublicGetProtectedSetProperty)), typeof(int), modelType); 1173var modelIdentity = ModelMetadataIdentity.ForType(modelType); 1177var employeeId = ModelMetadataIdentity.ForProperty(modelType.GetProperty(nameof(Employee.Id)), typeof(int), modelType); 1179var employeeUnit = ModelMetadataIdentity.ForProperty(modelType.GetProperty(nameof(Employee.Unit)), typeof(BusinessUnit), modelType); 1181var employeeManager = ModelMetadataIdentity.ForProperty(modelType.GetProperty(nameof(Employee.Manager)), typeof(Employee), modelType); 1183var employeeEmployees = ModelMetadataIdentity.ForProperty(modelType.GetProperty(nameof(Employee.Employees)), typeof(List<Employee>), modelType); 1187var unitHead = ModelMetadataIdentity.ForProperty(unitModel.GetProperty(nameof(BusinessUnit.Head)), typeof(Employee), unitModel); 1189var unitId = ModelMetadataIdentity.ForProperty(unitModel.GetProperty(nameof(BusinessUnit.Id)), typeof(int), unitModel); 1214var modelIdentity = ModelMetadataIdentity.ForType(modelType); 1218var employeeId = ModelMetadataIdentity.ForProperty(modelType.GetProperty(nameof(Employee.Id)), typeof(int), modelType); 1220var employeeUnit = ModelMetadataIdentity.ForProperty(modelType.GetProperty(nameof(Employee.Unit)), typeof(BusinessUnit), modelType); 1222var employeeManager = ModelMetadataIdentity.ForProperty(modelType.GetProperty(nameof(Employee.Manager)), typeof(Employee), modelType); 1224var employeeEmployees = ModelMetadataIdentity.ForProperty(modelType.GetProperty(nameof(Employee.Employees)), typeof(List<Employee>), modelType); 1228var unitHead = ModelMetadataIdentity.ForProperty(unitModel.GetProperty(nameof(BusinessUnit.Head)), typeof(Employee), unitModel); 1230var unitId = ModelMetadataIdentity.ForProperty(unitModel.GetProperty(nameof(BusinessUnit.Id)), typeof(int), unitModel); 1257var modelIdentity = ModelMetadataIdentity.ForType(modelType); 1261var employeeId = ModelMetadataIdentity.ForProperty(modelType.GetProperty(nameof(Employee.Id)), typeof(int), modelType); 1263var employeeEmployees = ModelMetadataIdentity.ForProperty(modelType.GetProperty(nameof(Employee.Employees)), typeof(List<Employee>), modelType); 1286var modelIdentity = ModelMetadataIdentity.ForType(modelType); 1290var employeeId = ModelMetadataIdentity.ForProperty(modelType.GetProperty(nameof(Employee.Id)), typeof(int), modelType); 1292var employeeUnit = ModelMetadataIdentity.ForProperty(modelType.GetProperty(nameof(Employee.Unit)), typeof(BusinessUnit), modelType); 1294var employeeManager = ModelMetadataIdentity.ForProperty(modelType.GetProperty(nameof(Employee.Manager)), typeof(Employee), modelType); 1296var employeeEmployeesId = ModelMetadataIdentity.ForProperty(modelType.GetProperty(nameof(Employee.Employees)), typeof(List<Employee>), modelType); 1300var unitHead = ModelMetadataIdentity.ForProperty(unitModel.GetProperty(nameof(BusinessUnit.Head)), typeof(Employee), unitModel); 1302var unitId = ModelMetadataIdentity.ForProperty(unitModel.GetProperty(nameof(BusinessUnit.Id)), typeof(int), unitModel); 1333var modelIdentity = ModelMetadataIdentity.ForType(modelType); 1338var propertyId = ModelMetadataIdentity.ForProperty(modelType.GetProperty(nameof(SimpleRecordType.Property)), typeof(int), modelType); 1341var parameterId = ModelMetadataIdentity.ForParameter(parameter); 1346ModelMetadataIdentity.ForConstructor(constructor, modelType), metadataProvider.Object, hasValidators: null); 1377var modelIdentity = ModelMetadataIdentity.ForType(modelType); 1382var propertyId = ModelMetadataIdentity.ForProperty(modelType.GetProperty(nameof(SimpleRecordType.Property)), typeof(int), modelType); 1385var parameterId = ModelMetadataIdentity.ForParameter(parameter); 1389var constructorMetadata = CreateModelMetadata(ModelMetadataIdentity.ForConstructor(constructor, modelType), metadataProvider.Object, hasValidators: null); 1422var modelIdentity = ModelMetadataIdentity.ForType(modelType); 1427var propertyId = ModelMetadataIdentity.ForProperty(modelType.GetProperty(nameof(SimpleRecordTypeWithProperty.Property)), typeof(int), modelType); 1431var property2Id = ModelMetadataIdentity.ForProperty(modelType.GetProperty(nameof(SimpleRecordTypeWithProperty.Property2)), typeof(int), modelType); 1435var parameterId = ModelMetadataIdentity.ForParameter(parameter); 1439ModelMetadataIdentity.ForConstructor(constructor, modelType), metadataProvider.Object, hasValidators: null); 1467var modelIdentity = ModelMetadataIdentity.ForType(modelType); 1472var propertyId = ModelMetadataIdentity.ForProperty(modelType.GetProperty(nameof(SimpleRecordTypeWithProperty.Property)), typeof(int), modelType); 1476var property2Id = ModelMetadataIdentity.ForProperty(modelType.GetProperty(nameof(SimpleRecordTypeWithProperty.Property2)), typeof(int), modelType); 1480var parameterId = ModelMetadataIdentity.ForParameter(parameter); 1484ModelMetadataIdentity.ForConstructor(constructor, modelType), metadataProvider.Object, hasValidators: null); 1512var modelIdentity = ModelMetadataIdentity.ForType(modelType); 1517var propertyId = ModelMetadataIdentity.ForProperty(modelType.GetProperty(nameof(SimpleRecordTypeWithProperty.Property)), typeof(int), modelType); 1521var property2Id = ModelMetadataIdentity.ForProperty(modelType.GetProperty(nameof(SimpleRecordTypeWithProperty.Property2)), typeof(int), modelType); 1525var parameterId = ModelMetadataIdentity.ForParameter(parameter); 1529ModelMetadataIdentity.ForConstructor(constructor, modelType), metadataProvider.Object, hasValidators: null); 1557var modelIdentity = ModelMetadataIdentity.ForType(modelType); 1562var propertyId = ModelMetadataIdentity.ForProperty(modelType.GetProperty(nameof(SimpleRecordTypeWithProperty.Property)), typeof(int), modelType); 1565var property2Id = ModelMetadataIdentity.ForProperty(modelType.GetProperty(nameof(SimpleRecordTypeWithProperty.Property2)), typeof(int), modelType); 1568var parameterId = ModelMetadataIdentity.ForParameter(parameter); 1572ModelMetadataIdentity.ForConstructor(constructor, modelType), metadataProvider.Object, hasValidators: null); 1594ModelMetadataIdentity modelIdentity,
ModelBinding\Metadata\DefaultValidationMetadataProviderTest.cs (16)
17var key = ModelMetadataIdentity.ForProperty(typeof(string).GetProperty(nameof(string.Length)), typeof(int), typeof(string)); 37var key = ModelMetadataIdentity.ForProperty(typeof(string).GetProperty(nameof(string.Length)), typeof(int), typeof(string)); 54var key = ModelMetadataIdentity.ForType(typeof(ValidateNeverClass)); 70var key = ModelMetadataIdentity.ForProperty( 92var key = ModelMetadataIdentity.ForProperty( 116var key = ModelMetadataIdentity.ForProperty(typeof(string).GetProperty(nameof(string.Length)), typeof(int), typeof(string)); 135var key = ModelMetadataIdentity.ForProperty(typeof(string).GetProperty(nameof(string.Length)), typeof(int), typeof(string)); 154var key = ModelMetadataIdentity.ForProperty(typeof(string).GetProperty(nameof(string.Length)), typeof(int), typeof(string));
ModelBinding\Metadata\ExcludeBindingMetadataProviderTest.cs (4)
16var key = ModelMetadataIdentity.ForProperty( 40var key = ModelMetadataIdentity.ForProperty(
ModelBinding\Metadata\HasValidatorsValidationMetadataProviderTest.cs (10)
22var key = ModelMetadataIdentity.ForType(typeof(object)); 40var key = ModelMetadataIdentity.ForType(typeof(object)); 68var key = ModelMetadataIdentity.ForType(typeof(object)); 92var key = ModelMetadataIdentity.ForType(typeof(object)); 115var key = ModelMetadataIdentity.ForType(typeof(object));
ModelBinding\Metadata\SystemTextJsonValidationMetadataProviderTest.cs (8)
17var key = ModelMetadataIdentity.ForProperty(typeof(SampleTestClass).GetProperty(nameof(SampleTestClass.NoAttributesProperty)), typeof(int), typeof(SampleTestClass)); 35var key = ModelMetadataIdentity.ForProperty(typeof(SampleTestClass).GetProperty(propertyName), typeof(int), typeof(SampleTestClass)); 52var key = ModelMetadataIdentity.ForType(typeof(SampleTestClass)); 70var key = ModelMetadataIdentity.ForProperty(typeof(SampleTestClass).GetProperty(propertyName), typeof(int), typeof(SampleTestClass));
ModelBinding\ParameterBinderTest.cs (1)
845: base(ModelMetadataIdentity.ForType(typeof(string)))
ModelBinding\Validation\DefaultComplexObjectValidationStrategyTest.cs (2)
171var key = ModelMetadataIdentity.ForType(typeof(PersonRecord));
Microsoft.AspNetCore.Mvc.Core.TestCommon (8)
TestModelMetadataProvider.cs (8)
106var key = ModelMetadataIdentity.ForType(type); 123var key = ModelMetadataIdentity.ForProperty(property, property.PropertyType, containerType); 132var key = ModelMetadataIdentity.ForParameter(parameter); 191private readonly ModelMetadataIdentity _key; 193public MetadataBuilder(ModelMetadataIdentity key)
Microsoft.AspNetCore.Mvc.DataAnnotations.Test (118)
DataAnnotationsMetadataProviderTest.cs (106)
93var key = ModelMetadataIdentity.ForType(typeof(string)); 114var key = ModelMetadataIdentity.ForType(typeof(string)); 137var key = ModelMetadataIdentity.ForType(typeof(string)); 156var key = ModelMetadataIdentity.ForType(typeof(string)); 175var key = ModelMetadataIdentity.ForType(typeof(string)); 198var key = ModelMetadataIdentity.ForType(typeof(string)); 221var key = ModelMetadataIdentity.ForType(typeof(string)); 244var key = ModelMetadataIdentity.ForType(typeof(string)); 279var key = ModelMetadataIdentity.ForType(typeof(TestEnum)); 317var key = ModelMetadataIdentity.ForType(typeof(string)); 354var key = ModelMetadataIdentity.ForType(typeof(string)); 384var key = ModelMetadataIdentity.ForType(typeof(string)); 419var key = ModelMetadataIdentity.ForType(typeof(string)); 454var key = ModelMetadataIdentity.ForType(typeof(string)); 483var key = ModelMetadataIdentity.ForType(typeof(string)); 518var key = ModelMetadataIdentity.ForType(typeof(string)); 547var key = ModelMetadataIdentity.ForType(typeof(string)); 592var key = ModelMetadataIdentity.ForType(typeof(DataAnnotationsMetadataProviderTest)); 636var key = ModelMetadataIdentity.ForType(type); 670var key = ModelMetadataIdentity.ForType(type); 802var key = ModelMetadataIdentity.ForType(type); 831var key = ModelMetadataIdentity.ForType(type); 980var key = ModelMetadataIdentity.ForType(type); 1008var key = ModelMetadataIdentity.ForType(typeof(EnumWithDisplayOrder)); 1112var key = ModelMetadataIdentity.ForProperty(property, typeof(int), typeof(string)); 1133var key = ModelMetadataIdentity.ForProperty(property, typeof(int), typeof(string)); 1153var key = ModelMetadataIdentity.ForProperty( 1178var key = ModelMetadataIdentity.ForProperty( 1207var key = ModelMetadataIdentity.ForProperty( 1232var key = ModelMetadataIdentity.ForProperty(property, property.PropertyType, modelType); 1251var key = ModelMetadataIdentity.ForProperty(property, property.PropertyType, modelType); 1270var key = ModelMetadataIdentity.ForProperty(property, property.PropertyType, modelType); 1291var key = ModelMetadataIdentity.ForProperty(property, property.PropertyType, modelType); 1311var key = ModelMetadataIdentity.ForProperty(property, property.PropertyType, modelType); 1330var key = ModelMetadataIdentity.ForProperty(property, property.PropertyType, modelType); 1349var key = ModelMetadataIdentity.ForProperty(property, property.PropertyType, modelType); 1368var key = ModelMetadataIdentity.ForProperty(property, property.PropertyType, modelType); 1389var key = ModelMetadataIdentity.ForParameter(parameter); 1410var key = ModelMetadataIdentity.ForParameter(parameter); 1430var key = ModelMetadataIdentity.ForProperty(property.PropertyType, property.Name, modelType); 1456var key = ModelMetadataIdentity.ForProperty(property, typeof(int), typeof(string)); 1484var key = ModelMetadataIdentity.ForProperty(property, typeof(int), typeof(string)); 1506var key = ModelMetadataIdentity.ForProperty(property, typeof(int), typeof(string)); 1526var key = ModelMetadataIdentity.ForProperty(property, typeof(int), typeof(string)); 1546var key = ModelMetadataIdentity.ForProperty(property, typeof(int), typeof(string)); 1567var key = ModelMetadataIdentity.ForProperty(property, typeof(int), typeof(string)); 1585var key = ModelMetadataIdentity.ForProperty(property, type, type); 1601var key = ModelMetadataIdentity.ForProperty(property, type, type); 1618var key = ModelMetadataIdentity.ForProperty(property, type, type); 1637var key = ModelMetadataIdentity.ForProperty(property, type, type); 1654var key = ModelMetadataIdentity.ForParameter(parameter); 1671var key = ModelMetadataIdentity.ForParameter(parameter); 1686var key = ModelMetadataIdentity.ForType(typeof(EnumWithLocalizedDisplayNames));
DataMemberRequiredBindingMetadataProviderTest.cs (10)
23var key = ModelMetadataIdentity.ForProperty( 49var key = ModelMetadataIdentity.ForProperty( 77var key = ModelMetadataIdentity.ForType(typeof(ClassWithDataMemberIsRequiredTrue)); 97var key = ModelMetadataIdentity.ForProperty( 125var key = ModelMetadataIdentity.ForProperty(
ModelMetadataProviderTest.cs (2)
1059protected override DefaultMetadataDetails CreateTypeDetails(ModelMetadataIdentity key) 1075protected override DefaultMetadataDetails[] CreatePropertyDetails(ModelMetadataIdentity key)
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (6)
NewtonsoftJsonValidationMetadataProviderTest.cs (6)
19var key = ModelMetadataIdentity.ForProperty(typeof(SampleTestClass).GetProperty(nameof(SampleTestClass.NoAttributesProperty)), typeof(int), typeof(SampleTestClass)); 37var key = ModelMetadataIdentity.ForProperty(typeof(SampleTestClass).GetProperty(propertyName), typeof(int), typeof(SampleTestClass)); 56var key = ModelMetadataIdentity.ForProperty(typeof(SampleTestClass).GetProperty(propertyName), typeof(int), typeof(SampleTestClass));
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (4)
FormatWeekHelperTest.cs (2)
24var key = ModelMetadataIdentity.ForType(typeof(DateTime));
Rendering\HtmlHelperNameExtensionsTest.cs (2)
165ModelMetadataIdentity.ForType(typeof(DefaultTemplatesUtilities.ObjectTemplateModel))); 194ModelMetadataIdentity.ForType(typeof(DefaultTemplatesUtilities.ObjectTemplateModel)));