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")]
11 references to JsonPolymorphicAttribute
System.Text.Json (11)
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 (3)
88JsonPolymorphismOptions? options = JsonPolymorphismOptions.CreateFromAttributeDeclarations(typeInfo.Type, out JsonPolymorphicAttribute? polymorphicAttribute); 191static bool HasNonDefaultPolymorphismSettings(JsonPolymorphicAttribute attribute) => 249/// diagnosing an explicit <see cref="JsonPolymorphicAttribute.InferClosedTypePolymorphism"/> opt-in
System\Text\Json\Serialization\Metadata\JsonPolymorphismOptions.cs (2)
93out JsonPolymorphicAttribute? polymorphicAttribute) 96polymorphicAttribute = baseType.GetCustomAttribute<JsonPolymorphicAttribute>(inherit: false);
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (2)
299/// the configuration of this setting will be mapped from any <see cref="JsonDerivedTypeAttribute"/> or <see cref="JsonPolymorphicAttribute"/> annotations. 572/// from <see cref="JsonUnionAttribute.TypeClassifier"/> or <see cref="JsonPolymorphicAttribute.TypeClassifier"/>.