4 writes to Name
System.Text.Json (4)
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (1)
401propertyInfo.Name = name;
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Helpers.cs (1)
225propertyInfo.Name = name;
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (1)
312info.Name = string.Empty;
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (1)
984propertyInfo.Name = name;
29 references to Name
Microsoft.AspNetCore.OpenApi (4)
Schemas\JsonSchemaMapper\JsonSchemaMapper.cs (3)
465state.Push(property.Name); 481(properties ??= new()).Add(property.Name, propertySchema); 485(requiredProperties ??= new()).Add((JsonNode)property.Name);
Schemas\JsonSchemaMapper\JsonSchemaMapper.ReflectionHelpers.cs (1)
177return prop => dict.TryGetValue(new(prop.Name, prop.PropertyType), out ParameterInfo? parameter) ? parameter : null;
System.Text.Json (25)
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (1)
225Debug.Assert(jsonPropertyInfo.Name != null);
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (5)
388Debug.Assert(Name != null); 390NameAsUtf8Bytes = Encoding.UTF8.GetBytes(Name); 653sb.AppendLine($"{ind} Name: {Name},"); 702/// The value of <see cref="Name"/> cannot conflict with that of other <see cref="JsonPropertyInfo"/> defined in the declaring <see cref="JsonTypeInfo"/>. 995private string DebuggerDisplay => $"Name = {Name}, PropertyType = {PropertyType}";
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (10)
214/// It is required that added <see cref="JsonPropertyInfo"/> entries are unique up to <see cref="JsonPropertyInfo.Name"/>, 847sb.AppendLine($" {pi.Name}:"); 1091if (!propertyCache.TryAddValue(property.Name, property)) 1093ThrowHelper.ThrowInvalidOperationException_SerializerPropertyNameConflict(Type, property.Name); 1138string propertyName = jsonProperty.MemberName ?? jsonProperty.Name; 1171parameterCache.Add(jsonPropertyInfo.Name, jsonParameterInfo); 1370if (state.AddedProperties.TryAdd(jsonPropertyInfo.Name, (jsonPropertyInfo, Count))) 1378(JsonPropertyInfo other, int index) = state.AddedProperties[jsonPropertyInfo.Name]; 1383state.AddedProperties[jsonPropertyInfo.Name] = (jsonPropertyInfo, index); 1401ThrowHelper.ThrowInvalidOperationException_SerializerPropertyNameConflict(_jsonTypeInfo.Type, jsonPropertyInfo.Name);
System\Text\Json\ThrowHelper.Serialization.cs (9)
69throw new InvalidOperationException(SR.Format(SR.ObjectCreationHandlingPopulateNotSupportedByConverter, propertyInfo.Name, propertyInfo.DeclaringType)); 75throw new InvalidOperationException(SR.Format(SR.ObjectCreationHandlingPropertyMustHaveAGetter, propertyInfo.Name, propertyInfo.DeclaringType)); 81throw new InvalidOperationException(SR.Format(SR.ObjectCreationHandlingPropertyValueTypeMustHaveASetter, propertyInfo.Name, propertyInfo.DeclaringType)); 87throw new InvalidOperationException(SR.Format(SR.ObjectCreationHandlingPropertyCannotAllowPolymorphicDeserialization, propertyInfo.Name, propertyInfo.DeclaringType)); 93throw new InvalidOperationException(SR.Format(SR.ObjectCreationHandlingPropertyCannotAllowReadOnlyMember, propertyInfo.Name, propertyInfo.DeclaringType)); 262throw new InvalidOperationException(SR.Format(SR.JsonPropertyRequiredAndNotDeserializable, jsonPropertyInfo.Name, jsonPropertyInfo.DeclaringType)); 268throw new InvalidOperationException(SR.Format(SR.JsonPropertyRequiredAndExtensionData, jsonPropertyInfo.Name, jsonPropertyInfo.DeclaringType)); 297listOfMissingPropertiesBuilder.Append(property.Name); 762throw new InvalidOperationException(SR.Format(SR.JsonPropertyInfoBoundToDifferentParent, propertyInfo.Name, propertyInfo.ParentTypeInfo.Type.FullName));