64 references to JsonTypeInfoKind
Microsoft.AspNetCore.OpenApi (3)
Extensions\JsonTypeInfoExtensions.cs (2)
72
if (jsonTypeInfo is JsonTypeInfo { Kind:
JsonTypeInfoKind
.Enumerable } || type.IsArray)
77
if (jsonTypeInfo is JsonTypeInfo { Kind:
JsonTypeInfoKind
.Dictionary })
Services\Schemas\OpenApiSchemaService.cs (1)
42
if (jsonTypeInfo.Kind !=
JsonTypeInfoKind
.Object)
Microsoft.Extensions.AI (1)
Functions\AIFunctionFactory.cs (1)
320
case { Kind:
JsonTypeInfoKind
.None }:
Microsoft.Extensions.AI.Abstractions (8)
src\Shared\JsonSchemaExporter\JsonSchemaExporter.cs (5)
108
if (cacheResult && typeInfo.Kind is not
JsonTypeInfoKind
.None &&
239
case
JsonTypeInfoKind
.Object:
345
case
JsonTypeInfoKind
.Enumerable:
396
case
JsonTypeInfoKind
.Dictionary:
426
Debug.Assert(typeInfo.Kind is
JsonTypeInfoKind
.None, "The default case should handle unrecognize type kinds.");
src\Shared\JsonSchemaExporter\JsonSchemaExporter.ReflectionHelpers.cs (3)
38
Debug.Assert(typeInfo.Kind is
JsonTypeInfoKind
.Enumerable or
JsonTypeInfoKind
.Dictionary, "TypeInfo must be of collection type");
148
Debug.Assert(typeInfo.Kind is
JsonTypeInfoKind
.Object, "Should only be passed object JSON kinds.");
Shared (8)
JsonSchemaExporter\JsonSchemaExporter.cs (5)
108
if (cacheResult && typeInfo.Kind is not
JsonTypeInfoKind
.None &&
239
case
JsonTypeInfoKind
.Object:
345
case
JsonTypeInfoKind
.Enumerable:
396
case
JsonTypeInfoKind
.Dictionary:
426
Debug.Assert(typeInfo.Kind is
JsonTypeInfoKind
.None, "The default case should handle unrecognize type kinds.");
JsonSchemaExporter\JsonSchemaExporter.ReflectionHelpers.cs (3)
38
Debug.Assert(typeInfo.Kind is
JsonTypeInfoKind
.Enumerable or
JsonTypeInfoKind
.Dictionary, "TypeInfo must be of collection type");
148
Debug.Assert(typeInfo.Kind is
JsonTypeInfoKind
.Object, "Should only be passed object JSON kinds.");
System.Text.Json (44)
System\Text\Json\Schema\JsonSchemaExporter.cs (5)
82
if (cacheResult && typeInfo.Kind is not
JsonTypeInfoKind
.None &&
206
case
JsonTypeInfoKind
.Object:
272
case
JsonTypeInfoKind
.Enumerable:
322
case
JsonTypeInfoKind
.Dictionary:
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 (26)
113
/// Serialization callbacks are only supported for <see cref="
JsonTypeInfoKind
.Object"/> metadata.
126
if (Kind is not (
JsonTypeInfoKind
.Object or
JsonTypeInfoKind
.Enumerable or
JsonTypeInfoKind
.Dictionary))
143
/// Serialization callbacks are only supported for <see cref="
JsonTypeInfoKind
.Object"/> metadata.
156
if (Kind is not (
JsonTypeInfoKind
.Object or
JsonTypeInfoKind
.Enumerable or
JsonTypeInfoKind
.Dictionary))
173
/// Serialization callbacks are only supported for <see cref="
JsonTypeInfoKind
.Object"/> metadata.
186
if (Kind is not (
JsonTypeInfoKind
.Object or
JsonTypeInfoKind
.Enumerable or
JsonTypeInfoKind
.Dictionary))
209
/// Serialization callbacks are only supported for <see cref="
JsonTypeInfoKind
.Object"/> metadata.
222
if (Kind is not (
JsonTypeInfoKind
.Object or
JsonTypeInfoKind
.Enumerable or
JsonTypeInfoKind
.Dictionary))
235
/// Property is only applicable to metadata of kind <see cref="
JsonTypeInfoKind
.Object"/>.
313
if (Kind ==
JsonTypeInfoKind
.None)
461
/// of kind <see cref="
JsonTypeInfoKind
.Object"/>.
466
/// are metadata-agnostic and thus always resolve to <see cref="
JsonTypeInfoKind
.None"/>.
468
public
JsonTypeInfoKind
Kind { get; }
525
/// Unmapped member handling only supported for <see cref="
JsonTypeInfoKind
.Object"/>.
541
if (Kind !=
JsonTypeInfoKind
.Object)
569
/// Unmapped member handling only supported for <see cref="
JsonTypeInfoKind
.Object"/>.
585
if (Kind !=
JsonTypeInfoKind
.Object)
754
if (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)
119
return JsonTypeInfo.Kind is
JsonTypeInfoKind
.Dictionary;
127
return JsonTypeInfo.Kind is
JsonTypeInfoKind
.Enumerable;
System\Text\Json\ThrowHelper.Serialization.cs (3)
412
public static void ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(
JsonTypeInfoKind
kind)
632
else if (typeInfo.Kind is
JsonTypeInfoKind
.Enumerable or
JsonTypeInfoKind
.Dictionary)