1 write to PropertyType
System.Text.Json (1)
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (1)
374PropertyType = propertyType;
44 references to PropertyType
Aspire.Hosting.RemoteHost (1)
Ats\AtsMarshaller.cs (1)
621prop.Set(target, jsonValue.Deserialize(prop.PropertyType, s_jsonOptions));
Microsoft.AspNetCore.JsonPatch.SystemTextJson (6)
Internal\PocoAdapter.cs (6)
34if (!TryConvertValue(value, jsonProperty.PropertyType, serializerOptions, out var convertedValue)) 93if (jsonProperty.PropertyType.IsValueType 94&& Nullable.GetUnderlyingType(jsonProperty.PropertyType) == null) 96value = Activator.CreateInstance(jsonProperty.PropertyType); 124if (!TryConvertValue(value, jsonProperty.PropertyType, serializerOptions, out var convertedValue)) 155if (!TryConvertValue(value, jsonProperty.PropertyType, serializerOptions, out var convertedValue))
Microsoft.AspNetCore.OpenApi (4)
Extensions\JsonNodeSchemaExtensions.cs (3)
534var shouldApplyNullableSchema = propertyInfo.PropertyType != typeof(object) && (propertyInfo.IsGetNullable || propertyInfo.IsSetNullable); 538var shouldPruneNullFromReadOnlyProperty = propertyInfo.PropertyType != typeof(object) && 568propertyInfo.PropertyType != typeof(object) && propertyInfo.ShouldApplyNullablePropertySchema())
Services\Schemas\OpenApiSchemaService.cs (1)
560await InnerApplySchemaTransformersAsync(propertySchema, _jsonSerializerOptions.GetTypeInfo(propertyInfo.PropertyType), propertyInfo, context, transformer, cancellationToken);
System.Text.Json (33)
System\Text\Json\Serialization\JsonSerializer.Read.HandlePropertyName.cs (8)
116bool isReadOnlyDictionary = jsonPropertyInfo.PropertyType == typeof(IReadOnlyDictionary<string, object>) || 117jsonPropertyInfo.PropertyType == typeof(IReadOnlyDictionary<string, JsonElement>); 123Type? underlyingIDictionaryType = jsonPropertyInfo.PropertyType.GetCompatibleGenericInterface(typeof(IDictionary<,>)) 124?? jsonPropertyInfo.PropertyType.GetCompatibleGenericInterface(typeof(IReadOnlyDictionary<,>)); 143if (jsonPropertyInfo.PropertyType.FullName == JsonTypeInfo.JsonObjectTypeName) 149else if (jsonPropertyInfo.PropertyType == typeof(IReadOnlyDictionary<string, object>)) 169else if (jsonPropertyInfo.PropertyType == typeof(IReadOnlyDictionary<string, JsonElement>)) 191ThrowHelper.ThrowNotSupportedException_SerializationNotSupported(jsonPropertyInfo.PropertyType);
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (1)
731propertyInfo.PropertyType == ignoredMember.PropertyType;
System\Text\Json\Serialization\Metadata\JsonParameterInfo.cs (2)
17Debug.Assert(matchingProperty.PropertyType == parameterInfoValues.ParameterType); 40public Type ParameterType => MatchingProperty.PropertyType;
System\Text\Json\Serialization\Metadata\JsonPropertyInfo.cs (9)
233/// The current <see cref="PropertyType"/> is not a reference type or <see cref="Nullable{T}"/>. 269/// The current <see cref="PropertyType"/> is not a reference type or <see cref="Nullable{T}"/>. 308/// The current <see cref="PropertyType"/> is not valid for use with extension data. 321if (value && !JsonTypeInfo.IsValidExtensionDataProperty(PropertyType)) 425_jsonTypeInfo ??= Options.GetTypeInfoInternal(PropertyType); 634(!PropertyType.IsValueType || Set is not null) && 652if (PropertyType.IsValueType && Set is null) 700potentialNumberType = PropertyType; 1085private string DebuggerDisplay => $"Name = {Name}, PropertyType = {PropertyType}";
System\Text\Json\Serialization\Metadata\JsonPropertyInfoOfT.cs (5)
152Options.ExpandConverterFactory(CustomConverter, PropertyType) // Expand any property-level custom converters. 317T? fastValue = EffectiveConverter.Read(ref reader, PropertyType, Options); 337success = EffectiveConverter.TryRead(ref reader, PropertyType, Options, ref state, out T? value, out bool populatedValue); 387value = EffectiveConverter.Read(ref reader, PropertyType, Options); 392success = EffectiveConverter.TryRead(ref reader, PropertyType, Options, ref state, out T? typedValue, out _);
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (3)
1493Debug.Assert(jsonPropertyInfo.PropertyType == propertyType); 1638ParameterLookupKey propKey = new(propertyInfo.PropertyType, propertyName); 1664ParameterLookupKey paramKey = new(propertyInfo.PropertyType, propertyName);
System\Text\Json\ThrowHelper.Serialization.cs (5)
543Type propertyType = state.Current.JsonPropertyInfo?.PropertyType ?? 615throw new InvalidOperationException(SR.Format(SR.SerializationDataExtensionPropertyInvalid, jsonPropertyInfo.PropertyType, jsonPropertyInfo.MemberName)); 621throw new InvalidOperationException(SR.Format(SR.PropertyTypeNotNullable, jsonPropertyInfo.PropertyType)); 639Type propertyType = state.Current.JsonPropertyInfo?.PropertyType ?? state.Current.JsonTypeInfo.Type; 667Type propertyType = state.Current.JsonPropertyInfo?.PropertyType ?? state.Current.JsonTypeInfo.Type;