4 writes to DerivedType
System.Text.Json (4)
System\Text\Json\Serialization\Metadata\JsonDerivedType.cs (4)
19DerivedType = derivedType; 30DerivedType = derivedType; 41DerivedType = derivedType; 48DerivedType = derivedType;
22 references to DerivedType
Microsoft.AspNetCore.OpenApi (4)
Extensions\JsonNodeSchemaExtensions.cs (3)
449var jsonDerivedType = context.TypeInfo.Options.GetTypeInfo(derivedType.DerivedType); 522&& !polymorphismOptions.DerivedTypes.Any(type => type.DerivedType == context.TypeInfo.Type); 534&& polymorphismOptions.DerivedTypes.Any(type => type.DerivedType == context.TypeInfo.Type && type.TypeDiscriminator is not null);
Services\Schemas\OpenApiSchemaService.cs (1)
537var derivedJsonTypeInfo = _jsonSerializerOptions.GetTypeInfo(derivedType.DerivedType);
Microsoft.Extensions.AI.Abstractions.Tests (10)
Utilities\AIJsonUtilitiesTests.cs (10)
1318Assert.Contains(derivedAIContentTypes, dt => dt.DerivedType == typeof(LeafContent)); 1319Assert.Contains(aiContentTypes, dt => dt.DerivedType == typeof(LeafContent)); 1370Assert.Contains(toolCallTypes, dt => dt.DerivedType == typeof(DerivedToolCallContent)); 1371Assert.Contains(aiContentTypes, dt => dt.DerivedType == typeof(DerivedToolCallContent)); 1409Assert.Contains(aiContentDerivedTypes, dt => dt.DerivedType == typeof(DerivedAIContent)); 1410Assert.Contains(aiContentDerivedTypes, dt => dt.DerivedType == typeof(LeafContent)); 1411Assert.Contains(derivedAIContentTypes, dt => dt.DerivedType == typeof(LeafContent)); 1455Assert.Contains(aiContentDerivedTypes, dt => dt.DerivedType == typeof(LeafContent)); 1456Assert.DoesNotContain(aiContentDerivedTypes, dt => dt.DerivedType == typeof(DerivedAIContent)); 1457Assert.Contains(derivedAIContentTypes, dt => dt.DerivedType == typeof(LeafContent));
System.Text.Json (8)
System\Text\Json\Schema\JsonSchemaExporter.cs (2)
125JsonTypeInfo derivedTypeInfo = typeInfo.Options.GetTypeInfoInternal(derivedType.DerivedType); 520if (derivedType.DerivedType == typeInfo.Type)
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Helpers.cs (5)
209if (entry.DerivedType is null || !entry.DerivedType.IsGenericTypeDefinition) 223baseType, entry.DerivedType, SR.Polymorphism_OpenGeneric_Reason_NotAssignable); 230entry.DerivedType, baseTypeDefinition, baseTypeArgs, 234baseType, entry.DerivedType, failureReason!);
System\Text\Json\Serialization\Metadata\JsonDerivedType.cs (1)
64derivedType = DerivedType;