1 write to Kind
System.Text.Json (1)
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (1)
44
Kind
= GetTypeInfoKind(type, converter);
65 references to Kind
Microsoft.AspNetCore.Components.Server (1)
Circuits\ComponentParameterDeserializer.cs (1)
123
.GetTypeInfo(parameterType).
Kind
== JsonTypeInfoKind.Union;
Microsoft.AspNetCore.Components.WebAssembly (1)
Prerendering\WebAssemblyComponentParameterDeserializer.cs (1)
81
WebAssemblyComponentSerializationSettings.JsonSerializationOptions.GetTypeInfo(parameterType).
Kind
== JsonTypeInfoKind.Union)
Microsoft.AspNetCore.OpenApi (4)
Extensions\JsonNodeSchemaExtensions.cs (1)
479
if (context.TypeInfo.
Kind
== JsonTypeInfoKind.Union)
Extensions\JsonTypeInfoExtensions.cs (2)
80
if (jsonTypeInfo is JsonTypeInfo {
Kind
: JsonTypeInfoKind.Enumerable } || type.IsArray)
85
if (jsonTypeInfo is JsonTypeInfo {
Kind
: JsonTypeInfoKind.Dictionary })
Services\Schemas\OpenApiSchemaService.cs (1)
43
if (jsonTypeInfo.
Kind
!= JsonTypeInfoKind.Object)
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)
73
if (cacheResult && typeInfo.
Kind
is not JsonTypeInfoKind.None &&
215
switch (typeInfo.
Kind
)
420
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)
165
if (typeInfo.
Kind
is not JsonTypeInfoKind.Union)
517
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);
151
Debug.Assert(typeInfo.
Kind
is JsonTypeInfoKind.Object);
166
Debug.Assert(typeInfo.
Kind
is JsonTypeInfoKind.Object);
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (36)
79
/// A parameterless factory is not supported for the current metadata <see cref="
Kind
"/>.
123
if (
Kind
is not (JsonTypeInfoKind.Object or JsonTypeInfoKind.Enumerable or JsonTypeInfoKind.Dictionary))
125
ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(
Kind
);
153
if (
Kind
is not (JsonTypeInfoKind.Object or JsonTypeInfoKind.Enumerable or JsonTypeInfoKind.Dictionary))
155
ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(
Kind
);
183
if (
Kind
is not (JsonTypeInfoKind.Object or JsonTypeInfoKind.Enumerable or JsonTypeInfoKind.Dictionary))
185
ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(
Kind
);
219
if (
Kind
is not (JsonTypeInfoKind.Object or JsonTypeInfoKind.Enumerable or JsonTypeInfoKind.Dictionary))
221
ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(
Kind
);
295
/// Polymorphic serialization is not supported for the current metadata <see cref="
Kind
"/>.
310
if (
Kind
== JsonTypeInfoKind.None)
312
ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(
Kind
);
360
/// This property is only meaningful when <see cref="
Kind
"/> is <see cref="JsonTypeInfoKind.Union"/>.
701
/// The <see cref="JsonConverter"/> associated with the type determines the value of <see cref="
Kind
"/>,
711
/// The value of <see cref="
Kind
"/> determines what aspects of the JSON contract are configurable.
715
/// The value of <see cref="
Kind
"/> is determined exclusively by the <see cref="JsonConverter"/>
793
if (
Kind
!= JsonTypeInfoKind.Object)
795
ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(
Kind
);
833
if (
Kind
!= JsonTypeInfoKind.Object)
835
ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(
Kind
);
1001
if (
Kind
== JsonTypeInfoKind.Object)
1029
if (
Kind
is JsonTypeInfoKind.Union)
1038
if (
Kind
is JsonTypeInfoKind.Union &&
1053
Debug.Assert(
Kind
is JsonTypeInfoKind.Union);
1073
Debug.Assert(
Kind
is JsonTypeInfoKind.Union);
1089
Debug.Assert(
Kind
is JsonTypeInfoKind.Union || PolymorphismOptions is not null);
1102
if (
Kind
is JsonTypeInfoKind.Union)
1371
/// What converter does get resolved influences the value of <see cref="
Kind
"/>,
1399
/// What converter does get resolved influences the value of <see cref="
Kind
"/>,
1535
Debug.Assert(
Kind
== JsonTypeInfoKind.Object);
1647
Debug.Assert(
Kind
== JsonTypeInfoKind.Object);
1705
if (
Kind
is JsonTypeInfoKind.Object or JsonTypeInfoKind.Enumerable or JsonTypeInfoKind.Dictionary)
1823
public override bool IsReadOnly => _jsonTypeInfo._properties == this && _jsonTypeInfo.IsReadOnly || _jsonTypeInfo.
Kind
!= JsonTypeInfoKind.Object;
1831
if (_jsonTypeInfo.
Kind
!= JsonTypeInfoKind.Object)
1833
ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(_jsonTypeInfo.
Kind
);
1902
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)
117
public bool IsProcessingDictionary() => JsonTypeInfo.
Kind
is JsonTypeInfoKind.Dictionary;
122
public bool IsProcessingEnumerable() => JsonTypeInfo.
Kind
is JsonTypeInfoKind.Enumerable;
System\Text\Json\ThrowHelper.Serialization.cs (1)
696
else if (typeInfo.
Kind
is JsonTypeInfoKind.Enumerable or JsonTypeInfoKind.Dictionary)