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)
362
if (context.TypeInfo.
PolymorphismOptions
is { } polymorphismOptions && context.BaseTypeInfo == null)
420
&& context.TypeInfo.
PolymorphismOptions
is { } polymorphismOptions
Services\Schemas\OpenApiSchemaService.cs (2)
184
if (schema.AnyOf is { Count: > 0 } && jsonTypeInfo.
PolymorphismOptions
is not null)
187
foreach (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)
636
typeInfo.
PolymorphismOptions
!.DerivedTypes.Add(new JsonDerivedType(t, t.Name));
Shared (1)
JsonSchemaExporter\JsonSchemaExporter.cs (1)
125
if (parentPolymorphicTypeInfo is null && typeInfo.
PolymorphismOptions
is { DerivedTypes.Count: > 0 } polyOptions)
System.Text.Json (8)
System\Text\Json\Schema\JsonSchemaExporter.cs (3)
97
if (parentPolymorphicTypeInfo is null && typeInfo.
PolymorphismOptions
is { DerivedTypes.Count: > 0 } polyOptions)
395
Debug.Assert(typeInfo.
PolymorphismOptions
is not null);
397
foreach (JsonDerivedType derivedType in typeInfo.
PolymorphismOptions
.DerivedTypes)
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (2)
747
if (
PolymorphismOptions
!= null)
751
PolymorphicTypeResolver = new PolymorphicTypeResolver(Options,
PolymorphismOptions
, Type, Converter.CanHaveMetadata);
System\Text\Json\Serialization\Metadata\PolymorphicTypeResolver.cs (3)
258
if (typeInfo.
PolymorphismOptions
!= null)
270
if (candidateInfo?.
PolymorphismOptions
!= null)
282
if (candidateInfo?.
PolymorphismOptions
!= null)