80 references to JsonTypeInfoKind
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)
486
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 (71)
System\Text\Json\Schema\JsonSchemaExporter.cs (6)
73
if (cacheResult && typeInfo.Kind is not
JsonTypeInfoKind
.None &&
217
case
JsonTypeInfoKind
.Object:
283
case
JsonTypeInfoKind
.Enumerable:
333
case
JsonTypeInfoKind
.Dictionary:
361
case
JsonTypeInfoKind
.Union:
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)
122
if (typeInfo.Kind is not
JsonTypeInfoKind
.Union)
448
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 (48)
110
/// Serialization callbacks are only supported for <see cref="
JsonTypeInfoKind
.Object"/> metadata.
123
if (Kind is not (
JsonTypeInfoKind
.Object or
JsonTypeInfoKind
.Enumerable or
JsonTypeInfoKind
.Dictionary))
140
/// Serialization callbacks are only supported for <see cref="
JsonTypeInfoKind
.Object"/> metadata.
153
if (Kind is not (
JsonTypeInfoKind
.Object or
JsonTypeInfoKind
.Enumerable or
JsonTypeInfoKind
.Dictionary))
170
/// Serialization callbacks are only supported for <see cref="
JsonTypeInfoKind
.Object"/> metadata.
183
if (Kind is not (
JsonTypeInfoKind
.Object or
JsonTypeInfoKind
.Enumerable or
JsonTypeInfoKind
.Dictionary))
206
/// Serialization callbacks are only supported for <see cref="
JsonTypeInfoKind
.Object"/> metadata.
219
if (Kind is not (
JsonTypeInfoKind
.Object or
JsonTypeInfoKind
.Enumerable or
JsonTypeInfoKind
.Dictionary))
232
/// Property is only applicable to metadata of kind <see cref="
JsonTypeInfoKind
.Object"/>.
310
if (Kind ==
JsonTypeInfoKind
.None)
360
/// This property is only meaningful when <see cref="Kind"/> is <see cref="
JsonTypeInfoKind
.Union"/>.
713
/// of kind <see cref="
JsonTypeInfoKind
.Object"/>.
718
/// are metadata-agnostic and thus always resolve to <see cref="
JsonTypeInfoKind
.None"/>.
720
public
JsonTypeInfoKind
Kind { get; }
777
/// Unmapped member handling only supported for <see cref="
JsonTypeInfoKind
.Object"/>.
793
if (Kind !=
JsonTypeInfoKind
.Object)
817
/// Unmapped member handling only supported for <see cref="
JsonTypeInfoKind
.Object"/>.
833
if (Kind !=
JsonTypeInfoKind
.Object)
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)
1535
Debug.Assert(Kind ==
JsonTypeInfoKind
.Object);
1647
Debug.Assert(Kind ==
JsonTypeInfoKind
.Object);
1705
if (Kind is
JsonTypeInfoKind
.Object or
JsonTypeInfoKind
.Enumerable or
JsonTypeInfoKind
.Dictionary)
1785
private static
JsonTypeInfoKind
GetTypeInfoKind(Type type, JsonConverter converter)
1791
return
JsonTypeInfoKind
.None;
1796
case ConverterStrategy.Value: return
JsonTypeInfoKind
.None;
1797
case ConverterStrategy.Object: return
JsonTypeInfoKind
.Object;
1801
return Nullable.GetUnderlyingType(type) is null ?
JsonTypeInfoKind
.Union :
JsonTypeInfoKind
.None;
1802
case ConverterStrategy.Enumerable: return
JsonTypeInfoKind
.Enumerable;
1803
case ConverterStrategy.Dictionary: return
JsonTypeInfoKind
.Dictionary;
1823
public override bool IsReadOnly => _jsonTypeInfo._properties == this && _jsonTypeInfo.IsReadOnly || _jsonTypeInfo.Kind !=
JsonTypeInfoKind
.Object;
1831
if (_jsonTypeInfo.Kind !=
JsonTypeInfoKind
.Object)
System\Text\Json\Serialization\Metadata\JsonTypeInfoOfT.cs (1)
64
if (Kind ==
JsonTypeInfoKind
.None)
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 (3)
474
public static void ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(
JsonTypeInfoKind
kind)
696
else if (typeInfo.Kind is
JsonTypeInfoKind
.Enumerable or
JsonTypeInfoKind
.Dictionary)