4 writes to Name
System.Text.Json (4)
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (1)
398propertyInfo.Name = name;
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Helpers.cs (1)
231propertyInfo.Name = name;
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (1)
394info.Name = string.Empty;
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (1)
1013propertyInfo.Name = name;
38 references to Name
Microsoft.AspNetCore.OpenApi (1)
Services\Schemas\OpenApiSchemaService.cs (1)
209if (schema.Properties.TryGetValue(propertyInfo.Name, out var propertySchema))
Microsoft.AspNetCore.OpenApi.Tests (8)
Transformers\SchemaTransformerTests.cs (8)
50if (context.JsonPropertyInfo?.Name == "id") 54if (context.JsonPropertyInfo?.Name == "name") 58if (context.JsonPropertyInfo?.Name == "isComplete") 62if (context.JsonPropertyInfo?.Name == "dueDate") 83if (context.JsonPropertyInfo?.Name == "id") 87if (context.JsonPropertyInfo?.Name == "name") 91if (context.JsonPropertyInfo?.Name == "isComplete") 95if (context.JsonPropertyInfo?.Name == "dueDate")
Shared (4)
JsonSchemaExporter\JsonSchemaExporter.cs (3)
307state.PushSchemaNode(property.Name); 328(properties ??= new()).Add(new(property.Name, propertySchema)); 332(required ??= new()).Add(property.Name);
JsonSchemaExporter\JsonSchemaExporter.ReflectionHelpers.cs (1)
168return prop => dict.TryGetValue(new(prop.Name, prop.PropertyType), out ParameterInfo? parameter) ? parameter : null;
System.Text.Json (25)
System\Text\Json\Schema\JsonSchemaExporter.cs (3)
235state.PushSchemaNode(property.Name); 252(properties ??= []).Add(new(property.Name, propertySchema)); 259(required ??= []).Add(property.Name);
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (1)
216Debug.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"/>. 1076private 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 (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)
102if (property is { IsIgnored: false, IsExtensionData: false } && property.Name == propertyName)
System\Text\Json\ThrowHelper.Serialization.cs (9)
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)); 281throw new InvalidOperationException(SR.Format(SR.JsonPropertyRequiredAndNotDeserializable, jsonPropertyInfo.Name, jsonPropertyInfo.DeclaringType)); 287throw new InvalidOperationException(SR.Format(SR.JsonPropertyRequiredAndExtensionData, jsonPropertyInfo.Name, jsonPropertyInfo.DeclaringType)); 313listOfMissingPropertiesBuilder.Append(property.Name); 791throw new InvalidOperationException(SR.Format(SR.JsonPropertyInfoBoundToDifferentParent, propertyInfo.Name, propertyInfo.DeclaringTypeInfo.Type.FullName));