1 write to Key
Microsoft.AspNetCore.Mvc.Core (1)
ModelBinding\Metadata\ValidationMetadataProviderContext.cs (1)
24Key = key;
22 references to Key
Microsoft.AspNetCore.Mvc.Core (8)
ModelBinding\Metadata\DefaultValidationMetadataProvider.cs (3)
38if (context.Key.MetadataKind == ModelMetadataKind.Property) 45validationFilter = context.Key.ContainerType! 53else if (context.Key.MetadataKind == ModelMetadataKind.Parameter)
ModelBinding\Metadata\HasValidatorsValidationMetadataProvider.cs (2)
37if (provider.HasValidators(context.Key.ModelType, context.ValidationMetadata.ValidatorMetadata)) 41if (context.Key.MetadataKind == ModelMetadataKind.Property)
ModelBinding\Metadata\SystemTextJsonValidationMetadataProvider.cs (1)
60propertyName = context.Key.Name is string contextKeyName
ModelBinding\SuppressChildValidationMetadataProvider.cs (2)
62if (Type.IsAssignableFrom(context.Key.ModelType)) 72if (IsMatchingName(context.Key.ModelType))
Microsoft.AspNetCore.Mvc.Core.Test (1)
ModelBinding\Validation\DefaultComplexObjectValidationStrategyTest.cs (1)
227=> context.ValidationMetadata.ValidationModelName = context.Key.Name?.ToUpperInvariant();
Microsoft.AspNetCore.Mvc.Core.TestCommon (1)
TestModelMetadataProvider.cs (1)
222if (_key.Equals(context.Key))
Microsoft.AspNetCore.Mvc.DataAnnotations (11)
DataAnnotationsMetadataProvider.cs (11)
329!context.Key.ModelType.IsValueType && 330context.Key.MetadataKind != ModelMetadataKind.Type) 333if (context.Key.MetadataKind == ModelMetadataKind.Type) 337else if (context.Key.MetadataKind == ModelMetadataKind.Property) 339var property = context.Key.PropertyInfo; 345else if (context.Key.MetadataKind == ModelMetadataKind.Parameter) 349if (!context.Key.ParameterInfo!.HasDefaultValue) 356throw new InvalidOperationException("Unsupported ModelMetadataKind: " + context.Key.MetadataKind); 429var nullability = context.Key.MetadataKind switch 431ModelMetadataKind.Parameter => nullabilityContext.Create(context.Key.ParameterInfo!), 432ModelMetadataKind.Property => nullabilityContext.Create(context.Key.PropertyInfo!),
Microsoft.AspNetCore.Mvc.NewtonsoftJson (1)
NewtonsoftJsonValidationMetadataProvider.cs (1)
59propertyName = _jsonNamingPolicy.GetPropertyName(context.Key.Name!, false);