16 references to UnionCases
System.Text.Json (16)
System\Text\Json\Schema\JsonSchemaExporter.cs (1)
361if (typeInfo.UnionCases is { Count: > 0 } unionCases)
System\Text\Json\Serialization\Attributes\JsonUnionAttribute.cs (1)
28/// contract customization to populate <see cref="Metadata.JsonTypeInfo.UnionCases"/>
System\Text\Json\Serialization\JsonTypeClassifierContext.cs (1)
71/// list mirrors <see cref="JsonTypeInfo.UnionCases"/> on the resolved
System\Text\Json\Serialization\Metadata\DefaultJsonTypeInfoResolver.Union.cs (3)
88/// <see cref="JsonTypeInfo.UnionCases"/> in declaration order. Each ctor overload 100Debug.Assert(typeInfo.UnionCases.Count == 0, 105IList<JsonUnionCaseInfo> unionCases = typeInfo.UnionCases;
System\Text\Json\Serialization\Metadata\JsonMetadataServices.cs (1)
91typeInfo.UnionCases.Add(caseInfo);
System\Text\Json\Serialization\Metadata\JsonTypeInfo.cs (9)
417/// The returned type must match a <see cref="JsonUnionCaseInfo.CaseType"/> in <see cref="UnionCases"/>; 547/// serializes as that value shape. Populated at configuration time from <see cref="UnionCases"/>. 565/// First nullable union case type, if any. Populated at configuration time from <see cref="UnionCases"/>. 1036BuildUnionValueTypeMap(UnionCases, Options, this); 1041foreach (JsonUnionCaseInfo unionCase in UnionCases) 1060if (UnionCases.Count == 0) 1080foreach (JsonUnionCaseInfo unionCase in UnionCases) 1109Debug.Assert(UnionCases.Count > 0); 1113new List<JsonUnionCaseInfo>(UnionCases),