2 overrides of Type
System.Text.Json (2)
System\Text\Json\Serialization\JsonConverterFactory.cs (1)
142
public sealed override Type?
Type
=> null;
System\Text\Json\Serialization\JsonConverterOfT.cs (1)
497
public sealed override Type
Type
{ get; } = typeof(T);
25 references to Type
System.Text.Json (25)
System\Text\Json\Schema\JsonSchemaExporter.cs (1)
192
JsonTypeInfo elementTypeInfo = typeInfo.Options.GetTypeInfo(elementConverter.
Type
!);
System\Text\Json\Serialization\Converters\CastingConverter.cs (1)
27
Debug.Assert(typeof(T).IsInSubtypeRelationshipWith(sourceConverter.
Type
!));
System\Text\Json\Serialization\Converters\Collection\JsonCollectionConverter.cs (1)
167
bool success = polymorphicConverter.OnTryReadAsObject(ref reader, polymorphicConverter.
Type
!, options, ref state, out object? objectResult);
System\Text\Json\Serialization\Converters\Collection\JsonDictionaryConverter.cs (1)
189
bool success = polymorphicConverter.OnTryReadAsObject(ref reader, polymorphicConverter.
Type
!, options, ref state, out object? objectResult);
System\Text\Json\Serialization\Converters\Object\ObjectDefaultConverter.cs (1)
92
bool success = polymorphicConverter.OnTryReadAsObject(ref reader, polymorphicConverter.
Type
!, options, ref state, out object? objectResult);
System\Text\Json\Serialization\Converters\Object\ObjectWithParameterizedConstructorConverter.cs (1)
155
bool success = polymorphicConverter.OnTryReadAsObject(ref reader, polymorphicConverter.
Type
!, options, ref state, out object? objectResult);
System\Text\Json\Serialization\Converters\Value\NullableConverterFactory.cs (1)
27
if (!valueConverter.
Type
!.IsValueType && valueTypeToConvert.IsValueType)
System\Text\Json\Serialization\JsonConverter.MetadataHandling.cs (8)
33
Debug.Assert(
Type
!.IsAssignableFrom(resolvedType.Type));
51
Debug.Assert(
Type
!.IsAssignableFrom(polymorphicConverter.
Type
));
72
Debug.Assert(value != null &&
Type
!.IsAssignableFrom(value.GetType()));
85
if (CanBePolymorphic && runtimeType !=
Type
)
87
Debug.Assert(
Type
== typeof(object));
123
Debug.Assert(
Type
.IsAssignableFrom(polymorphicConverter.
Type
));
System\Text\Json\Serialization\JsonConverterOfT.cs (1)
378
Debug.Assert(jsonTypeInfo.Converter.
Type
== Type);
System\Text\Json\Serialization\JsonSerializer.Read.HandleMetadata.cs (4)
101
ThrowHelper.ThrowJsonException_MetadataCannotParsePreservedObjectIntoImmutable(converter.
Type
!);
117
ThrowHelper.ThrowJsonException_MetadataInvalidReferenceToValueType(converter.
Type
!);
504
ThrowHelper.ThrowJsonException_MetadataPreservedArrayValuesNotFound(ref state, converter.
Type
!);
511
ThrowHelper.ThrowJsonException_MetadataInvalidPropertyInArrayMetadata(ref state, converter.
Type
!, reader);
System\Text\Json\Serialization\JsonSerializerOptions.Converters.cs (1)
108
(propertyType.IsNullableOfT() ^ converter.
Type
!.IsNullableOfT()))
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Converters.cs (2)
89
converters.Add(converter.
Type
!, converter);
164
if (!converter.
Type
!.IsInSubtypeRelationshipWith(typeToConvert))
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (1)
965
if (converter.
Type
== type)
System\Text\Json\ThrowHelper.Serialization.cs (1)
394
throw new InvalidOperationException(SR.Format(SR.ConverterCanConvertMultipleTypes, jsonConverter.GetType(), jsonConverter.
Type
, runtimePropertyType));