18 references to PolymorphismOptions
Microsoft.AspNetCore.Http.Extensions (1)
src\Shared\Json\JsonSerializerExtensions.cs (1)
14=> jsonTypeInfo.Type.IsSealed || jsonTypeInfo.Type.IsValueType || jsonTypeInfo.PolymorphismOptions is not null;
Microsoft.AspNetCore.Http.Results (1)
src\Shared\Json\JsonSerializerExtensions.cs (1)
14=> jsonTypeInfo.Type.IsSealed || jsonTypeInfo.Type.IsValueType || jsonTypeInfo.PolymorphismOptions is not null;
Microsoft.AspNetCore.Mvc.Core (1)
src\Shared\Json\JsonSerializerExtensions.cs (1)
14=> jsonTypeInfo.Type.IsSealed || jsonTypeInfo.Type.IsValueType || jsonTypeInfo.PolymorphismOptions is not null;
Microsoft.AspNetCore.OpenApi (4)
Extensions\JsonNodeSchemaExtensions.cs (2)
362if (context.TypeInfo.PolymorphismOptions is { } polymorphismOptions && context.BaseTypeInfo == null) 420&& context.TypeInfo.PolymorphismOptions is { } polymorphismOptions
Services\Schemas\OpenApiSchemaService.cs (2)
184if (schema.AnyOf is { Count: > 0 } && jsonTypeInfo.PolymorphismOptions is not null) 187foreach (var derivedType in jsonTypeInfo.PolymorphismOptions.DerivedTypes)
Microsoft.AspNetCore.Routing (1)
src\Shared\Json\JsonSerializerExtensions.cs (1)
14=> jsonTypeInfo.Type.IsSealed || jsonTypeInfo.Type.IsValueType || jsonTypeInfo.PolymorphismOptions is not null;
Microsoft.Extensions.AI.Tests (1)
ChatCompletion\DistributedCachingChatClientTest.cs (1)
636typeInfo.PolymorphismOptions!.DerivedTypes.Add(new JsonDerivedType(t, t.Name));
Shared (1)
JsonSchemaExporter\JsonSchemaExporter.cs (1)
125if (parentPolymorphicTypeInfo is null && typeInfo.PolymorphismOptions is { DerivedTypes.Count: > 0 } polyOptions)
System.Text.Json (8)
System\Text\Json\Schema\JsonSchemaExporter.cs (3)
97if (parentPolymorphicTypeInfo is null && typeInfo.PolymorphismOptions is { DerivedTypes.Count: > 0 } polyOptions) 395Debug.Assert(typeInfo.PolymorphismOptions is not null); 397foreach (JsonDerivedType derivedType in typeInfo.PolymorphismOptions.DerivedTypes)
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (2)
747if (PolymorphismOptions != null) 751PolymorphicTypeResolver = new PolymorphicTypeResolver(Options, PolymorphismOptions, Type, Converter.CanHaveMetadata);
System\Text\Json\Serialization\Metadata\PolymorphicTypeResolver.cs (3)
258if (typeInfo.PolymorphismOptions != null) 270if (candidateInfo?.PolymorphismOptions != null) 282if (candidateInfo?.PolymorphismOptions != null)