9 instantiations of JsonPolymorphicAttribute
Microsoft.Extensions.AI.Abstractions (9)
ChatCompletion\ChatResponseFormat.cs (1)
17[JsonPolymorphic(TypeDiscriminatorPropertyName = "$type")]
ChatCompletion\ChatToolMode.cs (1)
15[JsonPolymorphic(TypeDiscriminatorPropertyName = "$type")]
Contents\AIAnnotation.cs (1)
12[JsonPolymorphic(TypeDiscriminatorPropertyName = "$type")]
Contents\AIContent.cs (1)
10[JsonPolymorphic(TypeDiscriminatorPropertyName = "$type")]
Contents\AnnotatedRegion.cs (1)
13[JsonPolymorphic(TypeDiscriminatorPropertyName = "$type")]
Contents\UserInputRequestContent.cs (1)
16[JsonPolymorphic(TypeDiscriminatorPropertyName = "$type")]
Contents\UserInputResponseContent.cs (1)
16[JsonPolymorphic(TypeDiscriminatorPropertyName = "$type")]
Embeddings\Embedding.cs (1)
12[JsonPolymorphic(TypeDiscriminatorPropertyName = "$type")]
HostedMcpServerToolApprovalMode.cs (1)
19[JsonPolymorphic(TypeDiscriminatorPropertyName = "$type")]
9 references to JsonPolymorphicAttribute
System.Text.Json (9)
System\Text\Json\Serialization\Converters\FSharp\FSharpTypeConverterFactory.cs (1)
89.GetCustomAttribute<JsonPolymorphicAttribute>(inherit: false)?.TypeDiscriminatorPropertyName
System\Text\Json\Serialization\JsonSerializerOptions.Converters.cs (1)
32/// <see cref="JsonUnionAttribute.TypeClassifier"/> or <see cref="JsonPolymorphicAttribute.TypeClassifier"/>.
System\Text\Json\Serialization\JsonTypeClassifierFactory.cs (2)
17/// <see cref="JsonPolymorphicAttribute.TypeClassifier"/> properties. 33/// <see cref="JsonPolymorphicAttribute.TypeClassifier"/>. When both are present the attribute wins.
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (1)
88JsonPolymorphismOptions? options = JsonPolymorphismOptions.CreateFromAttributeDeclarations(typeInfo.Type, out JsonPolymorphicAttribute? polymorphicAttribute);
System\Text\Json\Serialization\Metadata\JsonPolymorphismOptions.cs (2)
96out JsonPolymorphicAttribute? polymorphicAttribute) 99polymorphicAttribute = baseType.GetCustomAttribute<JsonPolymorphicAttribute>(inherit: false);
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (2)
304/// the configuration of this setting will be mapped from any <see cref="JsonDerivedTypeAttribute"/> or <see cref="JsonPolymorphicAttribute"/> annotations. 577/// from <see cref="JsonUnionAttribute.TypeClassifier"/> or <see cref="JsonPolymorphicAttribute.TypeClassifier"/>.