1 write to Kind
System.Text.Json (1)
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (1)
44Kind = 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)
81WebAssemblyComponentSerializationSettings.JsonSerializationOptions.GetTypeInfo(parameterType).Kind == JsonTypeInfoKind.Union)
Microsoft.AspNetCore.OpenApi (4)
Extensions\JsonNodeSchemaExtensions.cs (1)
479if (context.TypeInfo.Kind == JsonTypeInfoKind.Union)
Extensions\JsonTypeInfoExtensions.cs (2)
80if (jsonTypeInfo is JsonTypeInfo { Kind: JsonTypeInfoKind.Enumerable } || type.IsArray) 85if (jsonTypeInfo is JsonTypeInfo { Kind: JsonTypeInfoKind.Dictionary })
Services\Schemas\OpenApiSchemaService.cs (1)
43if (jsonTypeInfo.Kind != JsonTypeInfoKind.Object)
Microsoft.Extensions.AI.Abstractions (3)
Functions\AIFunctionFactory.cs (1)
1061if (returnTypeInfo.Kind is JsonTypeInfoKind.None)
Utilities\AIJsonUtilities.Schema.Create.cs (2)
302if (ctx.TypeInfo.Kind is JsonTypeInfoKind.Enumerable && !objSchema.ContainsKey(ItemsPropertyName)) 554if (ctx.TypeInfo.Kind is JsonTypeInfoKind.Object &&
System.Text.Json (56)
System\Text\Json\Schema\JsonSchemaExporter.cs (3)
73if (cacheResult && typeInfo.Kind is not JsonTypeInfoKind.None && 215switch (typeInfo.Kind) 420Debug.Assert(typeInfo.Kind is JsonTypeInfoKind.None);
System\Text\Json\Serialization\Converters\Object\ObjectWithParameterizedConstructorConverter.cs (1)
620Debug.Assert(state.Current.JsonTypeInfo.Kind is JsonTypeInfoKind.Object);
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (5)
42&& typeInfo.Kind is JsonTypeInfoKind.Object) 55if (typeInfo is { Kind: JsonTypeInfoKind.Object, IsNullable: false }) 71if (typeInfo.Kind is JsonTypeInfoKind.Union) 165if (typeInfo.Kind is not JsonTypeInfoKind.Union) 517Debug.Assert(typeInfo.Kind is JsonTypeInfoKind.Object);
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Union.cs (1)
23Debug.Assert(typeInfo.Kind is JsonTypeInfoKind.Union);
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Helpers.cs (3)
90Debug.Assert(typeInfo.Kind != JsonTypeInfoKind.None); 151Debug.Assert(typeInfo.Kind is JsonTypeInfoKind.Object); 166Debug.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"/>. 123if (Kind is not (JsonTypeInfoKind.Object or JsonTypeInfoKind.Enumerable or JsonTypeInfoKind.Dictionary)) 125ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(Kind); 153if (Kind is not (JsonTypeInfoKind.Object or JsonTypeInfoKind.Enumerable or JsonTypeInfoKind.Dictionary)) 155ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(Kind); 183if (Kind is not (JsonTypeInfoKind.Object or JsonTypeInfoKind.Enumerable or JsonTypeInfoKind.Dictionary)) 185ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(Kind); 219if (Kind is not (JsonTypeInfoKind.Object or JsonTypeInfoKind.Enumerable or JsonTypeInfoKind.Dictionary)) 221ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(Kind); 295/// Polymorphic serialization is not supported for the current metadata <see cref="Kind"/>. 310if (Kind == JsonTypeInfoKind.None) 312ThrowHelper.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"/> 793if (Kind != JsonTypeInfoKind.Object) 795ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(Kind); 833if (Kind != JsonTypeInfoKind.Object) 835ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(Kind); 1001if (Kind == JsonTypeInfoKind.Object) 1029if (Kind is JsonTypeInfoKind.Union) 1038if (Kind is JsonTypeInfoKind.Union && 1053Debug.Assert(Kind is JsonTypeInfoKind.Union); 1073Debug.Assert(Kind is JsonTypeInfoKind.Union); 1089Debug.Assert(Kind is JsonTypeInfoKind.Union || PolymorphismOptions is not null); 1102if (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"/>, 1535Debug.Assert(Kind == JsonTypeInfoKind.Object); 1647Debug.Assert(Kind == JsonTypeInfoKind.Object); 1705if (Kind is JsonTypeInfoKind.Object or JsonTypeInfoKind.Enumerable or JsonTypeInfoKind.Dictionary) 1823public override bool IsReadOnly => _jsonTypeInfo._properties == this && _jsonTypeInfo.IsReadOnly || _jsonTypeInfo.Kind != JsonTypeInfoKind.Object; 1831if (_jsonTypeInfo.Kind != JsonTypeInfoKind.Object) 1833ThrowHelper.ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(_jsonTypeInfo.Kind); 1902private 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"/>. 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)
117public bool IsProcessingDictionary() => JsonTypeInfo.Kind is JsonTypeInfoKind.Dictionary; 122public bool IsProcessingEnumerable() => JsonTypeInfo.Kind is JsonTypeInfoKind.Enumerable;
System\Text\Json\ThrowHelper.Serialization.cs (1)
696else if (typeInfo.Kind is JsonTypeInfoKind.Enumerable or JsonTypeInfoKind.Dictionary)