4 instantiations of ModelMetadataIdentity
Microsoft.AspNetCore.Mvc.Abstractions (4)
ModelBinding\Metadata\ModelMetadataIdentity.cs (4)
36
return new
ModelMetadataIdentity
(modelType);
55
return new
ModelMetadataIdentity
(modelType, propertyInfo.Name, containerType, fieldInfo: propertyInfo);
78
return new
ModelMetadataIdentity
(modelType, parameter.Name, fieldInfo: parameter);
93
return new
ModelMetadataIdentity
(modelType, constructor.Name, constructorInfo: constructor);
66 references to ModelMetadataIdentity
Microsoft.AspNetCore.Mvc.Abstractions (21)
ModelBinding\Metadata\ModelMetadataIdentity.cs (18)
11
public 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>
32
public static
ModelMetadataIdentity
ForType(Type modelType)
40
/// Creates a <see cref="
ModelMetadataIdentity
"/> for the provided property.
45
/// <returns>A <see cref="
ModelMetadataIdentity
"/>.</returns>
46
public static
ModelMetadataIdentity
ForProperty(
59
/// Creates a <see cref="
ModelMetadataIdentity
"/> for the provided parameter.
62
/// <returns>A <see cref="
ModelMetadataIdentity
"/>.</returns>
63
public static
ModelMetadataIdentity
ForParameter(ParameterInfo parameter)
67
/// Creates a <see cref="
ModelMetadataIdentity
"/> for the provided parameter with the specified
72
/// <returns>A <see cref="
ModelMetadataIdentity
"/>.</returns>
73
public static
ModelMetadataIdentity
ForParameter(ParameterInfo parameter, Type modelType)
82
/// Creates a <see cref="
ModelMetadataIdentity
"/> for the provided parameter with the specified
87
/// <returns>A <see cref="
ModelMetadataIdentity
"/>.</returns>
88
public static
ModelMetadataIdentity
ForConstructor(ConstructorInfo constructor, Type modelType)
160
public bool Equals(
ModelMetadataIdentity
other)
174
var other = obj as
ModelMetadataIdentity
?;
ModelBinding\ModelMetadata.cs (3)
54
/// <param name="identity">The <see cref="
ModelMetadataIdentity
"/>.</param>
55
protected ModelMetadata(
ModelMetadataIdentity
identity)
112
protected internal
ModelMetadataIdentity
Identity { get; }
Microsoft.AspNetCore.Mvc.ApiExplorer (4)
EndpointMetadataApiDescriptionProvider.cs (3)
520
new(
ModelMetadataIdentity
.ForType(type));
528
return new(
ModelMetadataIdentity
.ForProperty(propertyInfo, type, propertyInfo.DeclaringType));
530
return new(
ModelMetadataIdentity
.ForParameter(parameterInfo, type));
EndpointModelMetadata.cs (1)
13
public EndpointModelMetadata(
ModelMetadataIdentity
identity) : base(identity)
Microsoft.AspNetCore.Mvc.Core (41)
ModelBinding\Metadata\BindingMetadataProviderContext.cs (4)
16
/// <param name="key">The <see cref="
ModelMetadataIdentity
"/> for the <see cref="ModelMetadata"/>.</param>
19
ModelMetadataIdentity
key,
39
/// Gets the <see cref="
ModelMetadataIdentity
"/>.
41
public
ModelMetadataIdentity
Key { get; }
ModelBinding\Metadata\DefaultMetadataDetails.cs (4)
19
/// <param name="key">The <see cref="
ModelMetadataIdentity
"/>.</param>
21
public DefaultMetadataDetails(
ModelMetadataIdentity
key, ModelAttributes attributes)
45
/// Gets or sets the <see cref="
ModelMetadataIdentity
"/>.
47
public
ModelMetadataIdentity
Key { get; }
ModelBinding\Metadata\DefaultModelMetadata.cs (1)
575
ModelMetadataIdentity
.ForProperty(propertyInfo, typeof(object), ModelType),
ModelBinding\Metadata\DefaultModelMetadataProvider.cs (24)
20
private readonly ConcurrentDictionary<
ModelMetadataIdentity
, ModelMetadataCacheEntry> _modelMetadataCache = new();
21
private readonly Func<
ModelMetadataIdentity
, ModelMetadataCacheEntry> _cacheEntryFactory;
82
var
key =
ModelMetadataIdentity
.ForType(modelType);
161
var
key =
ModelMetadataIdentity
.ForType(modelType);
172
ModelMetadataIdentity
.ForParameter(parameter, modelType),
179
ModelMetadataIdentity
.ForProperty(property, modelType, property.DeclaringType!),
186
ModelMetadataIdentity
.ForConstructor(constructor, modelType),
190
private ModelMetadataCacheEntry CreateCacheEntry(
ModelMetadataIdentity
key)
215
private static DefaultMetadataDetails CreateSinglePropertyDetails(
ModelMetadataIdentity
propertyKey)
231
private DefaultMetadataDetails CreateConstructorDetails(
ModelMetadataIdentity
constructorKey)
241
var parameterDetails = CreateParameterDetails(
ModelMetadataIdentity
.ForParameter(parameter));
300
var
key =
ModelMetadataIdentity
.ForType(typeof(object));
325
/// The <see cref="
ModelMetadataIdentity
"/> identifying the model <see cref="Type"/>.
333
protected virtual DefaultMetadataDetails[] CreatePropertyDetails(
ModelMetadataIdentity
key)
342
var
propertyKey =
ModelMetadataIdentity
.ForProperty(
355
ModelMetadataIdentity
propertyKey,
387
/// The <see cref="
ModelMetadataIdentity
"/> identifying the model <see cref="Type"/>.
395
protected virtual DefaultMetadataDetails CreateTypeDetails(
ModelMetadataIdentity
key)
406
/// The <see cref="
ModelMetadataIdentity
"/> identifying the parameter <see cref="Type"/>.
409
protected virtual DefaultMetadataDetails CreateParameterDetails(
ModelMetadataIdentity
key)
ModelBinding\Metadata\DisplayMetadataProviderContext.cs (4)
16
/// <param name="key">The <see cref="
ModelMetadataIdentity
"/> for the <see cref="ModelMetadata"/>.</param>
19
ModelMetadataIdentity
key,
43
/// Gets the <see cref="
ModelMetadataIdentity
"/>.
45
public
ModelMetadataIdentity
Key { get; }
ModelBinding\Metadata\ValidationMetadataProviderContext.cs (4)
16
/// <param name="key">The <see cref="
ModelMetadataIdentity
"/> for the <see cref="ModelMetadata"/>.</param>
19
ModelMetadataIdentity
key,
39
/// Gets the <see cref="
ModelMetadataIdentity
"/>.
41
public
ModelMetadataIdentity
Key { get; }