4 writes to Name
System.Text.Json (4)
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (1)
398
propertyInfo.
Name
= name;
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Helpers.cs (1)
231
propertyInfo.
Name
= name;
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (1)
394
info.
Name
= string.Empty;
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (1)
1013
propertyInfo.
Name
= name;
38 references to Name
Microsoft.AspNetCore.OpenApi (1)
Services\Schemas\OpenApiSchemaService.cs (1)
209
if (schema.Properties.TryGetValue(propertyInfo.
Name
, out var propertySchema))
Microsoft.AspNetCore.OpenApi.Tests (8)
Transformers\SchemaTransformerTests.cs (8)
50
if (context.JsonPropertyInfo?.
Name
== "id")
54
if (context.JsonPropertyInfo?.
Name
== "name")
58
if (context.JsonPropertyInfo?.
Name
== "isComplete")
62
if (context.JsonPropertyInfo?.
Name
== "dueDate")
83
if (context.JsonPropertyInfo?.
Name
== "id")
87
if (context.JsonPropertyInfo?.
Name
== "name")
91
if (context.JsonPropertyInfo?.
Name
== "isComplete")
95
if (context.JsonPropertyInfo?.
Name
== "dueDate")
Shared (4)
JsonSchemaExporter\JsonSchemaExporter.cs (3)
307
state.PushSchemaNode(property.
Name
);
328
(properties ??= new()).Add(new(property.
Name
, propertySchema));
332
(required ??= new()).Add(property.
Name
);
JsonSchemaExporter\JsonSchemaExporter.ReflectionHelpers.cs (1)
168
return prop => dict.TryGetValue(new(prop.
Name
, prop.PropertyType), out ParameterInfo? parameter) ? parameter : null;
System.Text.Json (25)
System\Text\Json\Schema\JsonSchemaExporter.cs (3)
235
state.PushSchemaNode(property.
Name
);
252
(properties ??= []).Add(new(property.
Name
, propertySchema));
259
(required ??= []).Add(property.
Name
);
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (1)
216
Debug.Assert(jsonPropertyInfo.
Name
!= null);
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (6)
477
Debug.Assert(
Name
!= null);
481
Name
is JsonSerializer.IdPropertyName or JsonSerializer.RefPropertyName)
487
ThrowHelper.ThrowInvalidOperationException_PropertyConflictsWithMetadataPropertyName(DeclaringType,
Name
);
490
NameAsUtf8Bytes = Encoding.UTF8.GetBytes(
Name
);
783
/// The value of <see cref="
Name
"/> cannot conflict with that of other <see cref="JsonPropertyInfo"/> defined in the declaring <see cref="JsonTypeInfo"/>.
1076
private string DebuggerDisplay => $"Name = {
Name
}, PropertyType = {PropertyType}";
System\Text\Json\Serialization\Metadata\JsonPropertyInfoOfT.cs (4)
214
ThrowHelper.ThrowJsonException_PropertyGetterDisallowNull(
Name
, state.Current.JsonTypeInfo.Type);
298
ThrowHelper.ThrowJsonException_PropertySetterDisallowNull(
Name
, state.Current.JsonTypeInfo.Type);
321
ThrowHelper.ThrowJsonException_PropertySetterDisallowNull(
Name
, state.Current.JsonTypeInfo.Type);
350
ThrowHelper.ThrowJsonException_PropertySetterDisallowNull(
Name
, state.Current.JsonTypeInfo.Type);
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (1)
242
/// It is required that added <see cref="JsonPropertyInfo"/> entries are unique up to <see cref="JsonPropertyInfo.
Name
"/>,
System\Text\Json\Serialization\Metadata\PolymorphicTypeResolver.cs (1)
102
if (property is { IsIgnored: false, IsExtensionData: false } && property.
Name
== propertyName)
System\Text\Json\ThrowHelper.Serialization.cs (9)
88
throw new InvalidOperationException(SR.Format(SR.ObjectCreationHandlingPopulateNotSupportedByConverter, propertyInfo.
Name
, propertyInfo.DeclaringType));
94
throw new InvalidOperationException(SR.Format(SR.ObjectCreationHandlingPropertyMustHaveAGetter, propertyInfo.
Name
, propertyInfo.DeclaringType));
100
throw new InvalidOperationException(SR.Format(SR.ObjectCreationHandlingPropertyValueTypeMustHaveASetter, propertyInfo.
Name
, propertyInfo.DeclaringType));
106
throw new InvalidOperationException(SR.Format(SR.ObjectCreationHandlingPropertyCannotAllowPolymorphicDeserialization, propertyInfo.
Name
, propertyInfo.DeclaringType));
112
throw new InvalidOperationException(SR.Format(SR.ObjectCreationHandlingPropertyCannotAllowReadOnlyMember, propertyInfo.
Name
, propertyInfo.DeclaringType));
281
throw new InvalidOperationException(SR.Format(SR.JsonPropertyRequiredAndNotDeserializable, jsonPropertyInfo.
Name
, jsonPropertyInfo.DeclaringType));
287
throw new InvalidOperationException(SR.Format(SR.JsonPropertyRequiredAndExtensionData, jsonPropertyInfo.
Name
, jsonPropertyInfo.DeclaringType));
313
listOfMissingPropertiesBuilder.Append(property.
Name
);
791
throw new InvalidOperationException(SR.Format(SR.JsonPropertyInfoBoundToDifferentParent, propertyInfo.
Name
, propertyInfo.DeclaringTypeInfo.Type.FullName));