1 write to Kind
System.Text.Json (1)
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (1)
49
Kind
= GetTypeInfoKind(type, converter);
59 references to Kind
Microsoft.Extensions.AI.Abstractions (3)
Functions\AIFunctionFactory.cs (1)
1061
if (returnTypeInfo.
Kind
is JsonTypeInfoKind.None)
Utilities\AIJsonUtilities.Schema.Create.cs (2)
302
if (ctx.TypeInfo.
Kind
is JsonTypeInfoKind.Enumerable && !objSchema.ContainsKey(ItemsPropertyName))
554
if (ctx.TypeInfo.
Kind
is JsonTypeInfoKind.Object &&
System.Text.Json (56)
System\Text\Json\Schema\JsonSchemaExporter.cs (3)
72
if (cacheResult && typeInfo.
Kind
is not JsonTypeInfoKind.None &&
194
switch (typeInfo.
Kind
)
399
Debug.Assert(typeInfo.
Kind
is JsonTypeInfoKind.None);
System\Text\Json\Serialization\Converters\Object\ObjectWithParameterizedConstructorConverter.cs (1)
620
Debug.Assert(state.Current.JsonTypeInfo.
Kind
is JsonTypeInfoKind.Object);
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (5)
42
&& typeInfo.
Kind
is JsonTypeInfoKind.Object)
55
if (typeInfo is {
Kind
: JsonTypeInfoKind.Object, IsNullable: false })
71
if (typeInfo.
Kind
is JsonTypeInfoKind.Union)
95
if (typeInfo.
Kind
is not JsonTypeInfoKind.Union)
120
Debug.Assert(typeInfo.
Kind
is JsonTypeInfoKind.Object);
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Union.cs (1)
23
Debug.Assert(typeInfo.
Kind
is JsonTypeInfoKind.Union);
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Helpers.cs (3)
90
Debug.Assert(typeInfo.
Kind
!= JsonTypeInfoKind.None);
150
Debug.Assert(typeInfo.
Kind
is JsonTypeInfoKind.Object);
165
Debug.Assert(typeInfo.
Kind
is JsonTypeInfoKind.Object);
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (36)
84
/// A parameterless factory is not supported for the current metadata <see cref="
Kind
"/>.
128
if (
Kind
is not (JsonTypeInfoKind.Object or JsonTypeInfoKind.Enumerable or JsonTypeInfoKind.Dictionary))
130
ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(
Kind
);
158
if (
Kind
is not (JsonTypeInfoKind.Object or JsonTypeInfoKind.Enumerable or JsonTypeInfoKind.Dictionary))
160
ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(
Kind
);
188
if (
Kind
is not (JsonTypeInfoKind.Object or JsonTypeInfoKind.Enumerable or JsonTypeInfoKind.Dictionary))
190
ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(
Kind
);
224
if (
Kind
is not (JsonTypeInfoKind.Object or JsonTypeInfoKind.Enumerable or JsonTypeInfoKind.Dictionary))
226
ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(
Kind
);
300
/// Polymorphic serialization is not supported for the current metadata <see cref="
Kind
"/>.
315
if (
Kind
== JsonTypeInfoKind.None)
317
ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(
Kind
);
365
/// This property is only meaningful when <see cref="
Kind
"/> is <see cref="JsonTypeInfoKind.Union"/>.
706
/// The <see cref="JsonConverter"/> associated with the type determines the value of <see cref="
Kind
"/>,
716
/// The value of <see cref="
Kind
"/> determines what aspects of the JSON contract are configurable.
720
/// The value of <see cref="
Kind
"/> is determined exclusively by the <see cref="JsonConverter"/>
798
if (
Kind
!= JsonTypeInfoKind.Object)
800
ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(
Kind
);
842
if (
Kind
!= JsonTypeInfoKind.Object)
844
ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(
Kind
);
1012
if (
Kind
== JsonTypeInfoKind.Object)
1040
if (
Kind
is JsonTypeInfoKind.Union)
1049
if (
Kind
is JsonTypeInfoKind.Union &&
1064
Debug.Assert(
Kind
is JsonTypeInfoKind.Union);
1084
Debug.Assert(
Kind
is JsonTypeInfoKind.Union);
1100
Debug.Assert(
Kind
is JsonTypeInfoKind.Union || PolymorphismOptions is not null);
1113
if (
Kind
is JsonTypeInfoKind.Union)
1382
/// What converter does get resolved influences the value of <see cref="
Kind
"/>,
1410
/// What converter does get resolved influences the value of <see cref="
Kind
"/>,
1546
Debug.Assert(
Kind
== JsonTypeInfoKind.Object);
1658
Debug.Assert(
Kind
== JsonTypeInfoKind.Object);
1716
if (
Kind
is JsonTypeInfoKind.Object or JsonTypeInfoKind.Enumerable or JsonTypeInfoKind.Dictionary)
1834
public override bool IsReadOnly => _jsonTypeInfo._properties == this && _jsonTypeInfo.IsReadOnly || _jsonTypeInfo.
Kind
!= JsonTypeInfoKind.Object;
1842
if (_jsonTypeInfo.
Kind
!= JsonTypeInfoKind.Object)
1844
ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(_jsonTypeInfo.
Kind
);
1913
private string DebuggerDisplay => $"Type = {Type.Name}, Kind = {
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)
696
else if (typeInfo.
Kind
is JsonTypeInfoKind.Enumerable or JsonTypeInfoKind.Dictionary)