50 references to JsonTypeInfoKind
Microsoft.AspNetCore.OpenApi (8)
Schemas\JsonSchemaMapper\JsonSchemaMapper.cs (5)
237typeInfo.Kind != JsonTypeInfoKind.None; 342case JsonTypeInfoKind.None: 400case JsonTypeInfoKind.Object: 492case JsonTypeInfoKind.Enumerable: 534case JsonTypeInfoKind.Dictionary:
Schemas\JsonSchemaMapper\JsonSchemaMapper.ReflectionHelpers.cs (3)
27Debug.Assert(typeInfo.Kind is JsonTypeInfoKind.Enumerable or JsonTypeInfoKind.Dictionary); 157Debug.Assert(typeInfo.Kind is JsonTypeInfoKind.Object);
System.Text.Json (42)
System\Text\Json\Serialization\Converters\Object\ObjectWithParameterizedConstructorConverter.cs (1)
619Debug.Assert(state.Current.JsonTypeInfo.Kind == JsonTypeInfoKind.Object);
System\Text\Json\Serialization\JsonSerializer.Read.HandlePropertyName.cs (1)
29if (jsonTypeInfo.Kind != JsonTypeInfoKind.Object)
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (2)
72if (typeInfo.Kind is JsonTypeInfoKind.Object) 93Debug.Assert(typeInfo.Kind is JsonTypeInfoKind.Object);
System\Text\Json\Serialization\Metadata\JsonMetadataServices.Helpers.cs (3)
86Debug.Assert(typeInfo.Kind != JsonTypeInfoKind.None); 115Debug.Assert(typeInfo.Kind is JsonTypeInfoKind.Object); 130Debug.Assert(typeInfo.Kind is JsonTypeInfoKind.Object);
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (29)
91/// Serialization callbacks are only supported for <see cref="JsonTypeInfoKind.Object"/> metadata. 104if (Kind != JsonTypeInfoKind.Object) 121/// Serialization callbacks are only supported for <see cref="JsonTypeInfoKind.Object"/> metadata. 134if (Kind != JsonTypeInfoKind.Object) 151/// Serialization callbacks are only supported for <see cref="JsonTypeInfoKind.Object"/> metadata. 164if (Kind != JsonTypeInfoKind.Object) 181/// Serialization callbacks are only supported for <see cref="JsonTypeInfoKind.Object"/> metadata. 194if (Kind != JsonTypeInfoKind.Object) 207/// Property is only applicable to metadata of kind <see cref="JsonTypeInfoKind.Object"/>. 285if (Kind == JsonTypeInfoKind.None) 433/// of kind <see cref="JsonTypeInfoKind.Object"/>. 438/// are metadata-agnostic and thus always resolve to <see cref="JsonTypeInfoKind.None"/>. 440public JsonTypeInfoKind Kind { get; private set; } 496/// Unmapped member handling only supported for <see cref="JsonTypeInfoKind.Object"/>. 512if (Kind != JsonTypeInfoKind.Object) 540/// Unmapped member handling only supported for <see cref="JsonTypeInfoKind.Object"/>. 556if (Kind != JsonTypeInfoKind.Object) 686if (Kind == JsonTypeInfoKind.Object) 1049Debug.Assert(Kind == JsonTypeInfoKind.Object); 1120Debug.Assert(Kind == JsonTypeInfoKind.Object); 1218if (Kind == JsonTypeInfoKind.Object) 1301private static JsonTypeInfoKind GetTypeInfoKind(Type type, JsonConverter converter) 1307return JsonTypeInfoKind.None; 1312case ConverterStrategy.Value: return JsonTypeInfoKind.None; 1313case ConverterStrategy.Object: return JsonTypeInfoKind.Object; 1314case ConverterStrategy.Enumerable: return JsonTypeInfoKind.Enumerable; 1315case ConverterStrategy.Dictionary: return JsonTypeInfoKind.Dictionary; 1335public override bool IsReadOnly => _jsonTypeInfo._properties == this && _jsonTypeInfo.IsReadOnly || _jsonTypeInfo.Kind != JsonTypeInfoKind.Object; 1343if (_jsonTypeInfo.Kind != JsonTypeInfoKind.Object)
System\Text\Json\Serialization\Metadata\JsonTypeInfoOfT.cs (1)
64if (Kind == JsonTypeInfoKind.None)
System\Text\Json\Serialization\ReadStackFrame.cs (2)
117return JsonTypeInfo.Kind is JsonTypeInfoKind.Dictionary; 125return JsonTypeInfo.Kind is JsonTypeInfoKind.Enumerable;
System\Text\Json\ThrowHelper.Serialization.cs (3)
395public static void ThrowInvalidOperationException_JsonTypeInfoOperationNotPossibleForKind(JsonTypeInfoKind kind) 603else if (typeInfo.Kind is JsonTypeInfoKind.Enumerable or JsonTypeInfoKind.Dictionary)