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