1 write to Kind
System.Text.Json (1)
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (1)
47Kind = GetTypeInfoKind(type, converter);
46 references to Kind
Microsoft.AspNetCore.OpenApi (2)
Extensions\JsonTypeInfoExtensions.cs (2)
72if (jsonTypeInfo is JsonTypeInfo { Kind: JsonTypeInfoKind.Enumerable } || type.IsArray) 77if (jsonTypeInfo is JsonTypeInfo { Kind: JsonTypeInfoKind.Dictionary })
Microsoft.Extensions.AI (1)
Functions\AIFunctionFactory.cs (1)
320case { Kind: JsonTypeInfoKind.None }:
Shared (5)
JsonSchemaExporter\JsonSchemaExporter.cs (3)
108if (cacheResult && typeInfo.Kind is not JsonTypeInfoKind.None && 237switch (typeInfo.Kind) 426Debug.Assert(typeInfo.Kind is JsonTypeInfoKind.None, "The default case should handle unrecognize type kinds.");
JsonSchemaExporter\JsonSchemaExporter.ReflectionHelpers.cs (2)
38Debug.Assert(typeInfo.Kind is JsonTypeInfoKind.Enumerable or JsonTypeInfoKind.Dictionary, "TypeInfo must be of collection type"); 148Debug.Assert(typeInfo.Kind is JsonTypeInfoKind.Object, "Should only be passed object JSON kinds.");
System.Text.Json (38)
System\Text\Json\Schema\JsonSchemaExporter.cs (3)
82if (cacheResult && typeInfo.Kind is not JsonTypeInfoKind.None && 204switch (typeInfo.Kind) 351Debug.Assert(typeInfo.Kind is JsonTypeInfoKind.None);
System\Text\Json\Serialization\Converters\Object\ObjectWithParameterizedConstructorConverter.cs (1)
604Debug.Assert(state.Current.JsonTypeInfo.Kind is JsonTypeInfoKind.Object);
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (2)
72if (typeInfo is { Kind: JsonTypeInfoKind.Object, IsNullable: false }) 99Debug.Assert(typeInfo.Kind is JsonTypeInfoKind.Object);
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Helpers.cs (3)
91Debug.Assert(typeInfo.Kind != JsonTypeInfoKind.None); 121Debug.Assert(typeInfo.Kind is JsonTypeInfoKind.Object); 136Debug.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"/>. 126if (Kind is not (JsonTypeInfoKind.Object or JsonTypeInfoKind.Enumerable or JsonTypeInfoKind.Dictionary)) 128ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(Kind); 156if (Kind is not (JsonTypeInfoKind.Object or JsonTypeInfoKind.Enumerable or JsonTypeInfoKind.Dictionary)) 158ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(Kind); 186if (Kind is not (JsonTypeInfoKind.Object or JsonTypeInfoKind.Enumerable or JsonTypeInfoKind.Dictionary)) 188ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(Kind); 222if (Kind is not (JsonTypeInfoKind.Object or JsonTypeInfoKind.Enumerable or JsonTypeInfoKind.Dictionary)) 224ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(Kind); 298/// Polymorphic serialization is not supported for the current metadata <see cref="Kind"/>. 313if (Kind == JsonTypeInfoKind.None) 315ThrowHelper.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"/> 541if (Kind != JsonTypeInfoKind.Object) 543ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(Kind); 585if (Kind != JsonTypeInfoKind.Object) 587ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(Kind); 754if (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"/>. 64if (Kind == JsonTypeInfoKind.None) 68ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(Kind);
System\Text\Json\Serialization\Metadata\PolymorphicTypeResolver.cs (1)
98if (derivedTypeInfo.JsonTypeInfo.Kind is JsonTypeInfoKind.Object)
System\Text\Json\Serialization\ReadStackFrame.cs (2)
119return JsonTypeInfo.Kind is JsonTypeInfoKind.Dictionary; 127return JsonTypeInfo.Kind is JsonTypeInfoKind.Enumerable;
System\Text\Json\ThrowHelper.Serialization.cs (1)
632else if (typeInfo.Kind is JsonTypeInfoKind.Enumerable or JsonTypeInfoKind.Dictionary)