4 writes to Name
System.Text.Json (4)
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (1)
479propertyInfo.Name = name;
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Helpers.cs (1)
270propertyInfo.Name = name;
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (1)
394info.Name = string.Empty;
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (1)
1476propertyInfo.Name = name;
38 references to Name
Aspire.Hosting.RemoteHost (1)
Ats\AtsMarshaller.cs (1)
614if (!source.TryGetPropertyValue(prop.Name, out var jsonValue))
Microsoft.Extensions.AI.Abstractions (1)
Utilities\AIJsonUtilities.Schema.Create.cs (1)
568string propertyName = property.Name;
System.Text.Json (36)
System\Text\Json\Schema\JsonSchemaExporter.cs (3)
225state.PushSchemaNode(property.Name); 242(properties ??= []).Add(new(property.Name, propertySchema)); 249(required ??= []).Add(property.Name);
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (1)
257Debug.Assert(jsonPropertyInfo.Name != null);
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (6)
477Debug.Assert(Name != null); 481Name is JsonSerializer.IdPropertyName or JsonSerializer.RefPropertyName) 487ThrowHelper.ThrowInvalidOperationException_PropertyConflictsWithMetadataPropertyName(DeclaringType, Name); 490NameAsUtf8Bytes = 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"/>. 1096private string DebuggerDisplay => $"Name = {Name}, PropertyType = {PropertyType}";
System\Text\Json\Serialization\Metadata\JsonPropertyInfoOfT.cs (4)
214ThrowHelper.ThrowJsonException_PropertyGetterDisallowNull(Name, state.Current.JsonTypeInfo.Type); 298ThrowHelper.ThrowJsonException_PropertySetterDisallowNull(Name, state.Current.JsonTypeInfo.Type); 321ThrowHelper.ThrowJsonException_PropertySetterDisallowNull(Name, state.Current.JsonTypeInfo.Type); 350ThrowHelper.ThrowJsonException_PropertySetterDisallowNull(Name, state.Current.JsonTypeInfo.Type);
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (11)
244/// It is required that added <see cref="JsonPropertyInfo"/> entries are unique up to <see cref="JsonPropertyInfo.Name"/>, 1594if (!propertyIndex.TryAdd(property.Name, property)) 1596ThrowHelper.ThrowInvalidOperationException_SerializerPropertyNameConflict(Type, property.Name); 1648string propertyName = propertyInfo.MemberName ?? propertyInfo.Name; 1674string propertyName = propertyInfo.MemberName ?? propertyInfo.Name; 1682propertyInfo.Name, 1683parameterIndex[paramKey].MatchingProperty.Name); 1869if (state.AddedProperties.TryAdd(jsonPropertyInfo.Name, (jsonPropertyInfo, Count))) 1877(JsonPropertyInfo other, int index) = state.AddedProperties[jsonPropertyInfo.Name]; 1882state.AddedProperties[jsonPropertyInfo.Name] = (jsonPropertyInfo, index); 1900ThrowHelper.ThrowInvalidOperationException_SerializerPropertyNameConflict(_jsonTypeInfo.Type, jsonPropertyInfo.Name);
System\Text\Json\Serialization\Metadata\PolymorphicTypeResolver.cs (1)
102if (property is { IsIgnored: false, IsExtensionData: false } && property.Name == propertyName)
System\Text\Json\ThrowHelper.Serialization.cs (10)
88throw new InvalidOperationException(SR.Format(SR.ObjectCreationHandlingPopulateNotSupportedByConverter, propertyInfo.Name, propertyInfo.DeclaringType)); 94throw new InvalidOperationException(SR.Format(SR.ObjectCreationHandlingPropertyMustHaveAGetter, propertyInfo.Name, propertyInfo.DeclaringType)); 100throw new InvalidOperationException(SR.Format(SR.ObjectCreationHandlingPropertyValueTypeMustHaveASetter, propertyInfo.Name, propertyInfo.DeclaringType)); 106throw new InvalidOperationException(SR.Format(SR.ObjectCreationHandlingPropertyCannotAllowPolymorphicDeserialization, propertyInfo.Name, propertyInfo.DeclaringType)); 112throw new InvalidOperationException(SR.Format(SR.ObjectCreationHandlingPropertyCannotAllowReadOnlyMember, propertyInfo.Name, propertyInfo.DeclaringType)); 293throw new InvalidOperationException(SR.Format(SR.JsonPropertyRequiredAndNotDeserializable, jsonPropertyInfo.Name, jsonPropertyInfo.DeclaringType)); 299throw new InvalidOperationException(SR.Format(SR.JsonPropertyRequiredAndExtensionData, jsonPropertyInfo.Name, jsonPropertyInfo.DeclaringType)); 311if (!AppendMissingProperty(builder, property.Name)) 351throw new JsonException(SR.Format(SR.DuplicatePropertiesNotAllowed_JsonPropertyInfo, property.Name, property.DeclaringType)); 855throw new InvalidOperationException(SR.Format(SR.JsonPropertyInfoBoundToDifferentParent, propertyInfo.Name, propertyInfo.DeclaringTypeInfo.Type.FullName));