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