1 write to Kind
System.Text.Json (1)
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (1)
47
Kind
= GetTypeInfoKind(type, converter);
40 references to Kind
Microsoft.AspNetCore.OpenApi (2)
Extensions\JsonTypeInfoExtensions.cs (2)
72
if (jsonTypeInfo is JsonTypeInfo {
Kind
: JsonTypeInfoKind.Enumerable } || type.IsArray)
77
if (jsonTypeInfo is JsonTypeInfo {
Kind
: JsonTypeInfoKind.Dictionary })
System.Text.Json (38)
System\Text\Json\Schema\JsonSchemaExporter.cs (3)
82
if (cacheResult && typeInfo.
Kind
is not JsonTypeInfoKind.None &&
204
switch (typeInfo.
Kind
)
351
Debug.Assert(typeInfo.
Kind
is JsonTypeInfoKind.None);
System\Text\Json\Serialization\Converters\Object\ObjectWithParameterizedConstructorConverter.cs (1)
604
Debug.Assert(state.Current.JsonTypeInfo.
Kind
is JsonTypeInfoKind.Object);
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (2)
72
if (typeInfo is {
Kind
: JsonTypeInfoKind.Object, IsNullable: false })
99
Debug.Assert(typeInfo.
Kind
is JsonTypeInfoKind.Object);
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Helpers.cs (3)
91
Debug.Assert(typeInfo.
Kind
!= JsonTypeInfoKind.None);
121
Debug.Assert(typeInfo.
Kind
is JsonTypeInfoKind.Object);
136
Debug.Assert(typeInfo.
Kind
is JsonTypeInfoKind.Object);
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (22)
82
/// A parameterless factory is not supported for the current metadata <see cref="
Kind
"/>.
126
if (
Kind
is not (JsonTypeInfoKind.Object or JsonTypeInfoKind.Enumerable or JsonTypeInfoKind.Dictionary))
128
ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(
Kind
);
156
if (
Kind
is not (JsonTypeInfoKind.Object or JsonTypeInfoKind.Enumerable or JsonTypeInfoKind.Dictionary))
158
ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(
Kind
);
186
if (
Kind
is not (JsonTypeInfoKind.Object or JsonTypeInfoKind.Enumerable or JsonTypeInfoKind.Dictionary))
188
ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(
Kind
);
222
if (
Kind
is not (JsonTypeInfoKind.Object or JsonTypeInfoKind.Enumerable or JsonTypeInfoKind.Dictionary))
224
ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(
Kind
);
298
/// Polymorphic serialization is not supported for the current metadata <see cref="
Kind
"/>.
313
if (
Kind
== JsonTypeInfoKind.None)
315
ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(
Kind
);
449
/// The <see cref="JsonConverter"/> associated with the type determines the value of <see cref="
Kind
"/>,
459
/// The value of <see cref="
Kind
"/> determines what aspects of the JSON contract are configurable.
463
/// The value of <see cref="
Kind
"/> is determined exclusively by the <see cref="JsonConverter"/>
541
if (
Kind
!= JsonTypeInfoKind.Object)
543
ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(
Kind
);
585
if (
Kind
!= JsonTypeInfoKind.Object)
587
ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(
Kind
);
754
if (
Kind
== JsonTypeInfoKind.Object)
902
/// What converter does get resolved influences the value of <see cref="
Kind
"/>,
933
/// What converter does get resolved influences the value of <see cref="
Kind
"/>,
System\Text\Json\Serialization\Metadata\JsonTypeInfoOfT.cs (3)
40
/// A parameterless factory is not supported for the current metadata <see cref="JsonTypeInfo.
Kind
"/>.
64
if (
Kind
== JsonTypeInfoKind.None)
68
ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(
Kind
);
System\Text\Json\Serialization\Metadata\PolymorphicTypeResolver.cs (1)
98
if (derivedTypeInfo.JsonTypeInfo.
Kind
is JsonTypeInfoKind.Object)
System\Text\Json\Serialization\ReadStackFrame.cs (2)
119
return JsonTypeInfo.
Kind
is JsonTypeInfoKind.Dictionary;
127
return JsonTypeInfo.
Kind
is JsonTypeInfoKind.Enumerable;
System\Text\Json\ThrowHelper.Serialization.cs (1)
632
else if (typeInfo.
Kind
is JsonTypeInfoKind.Enumerable or JsonTypeInfoKind.Dictionary)