Struct UnionCaseDataModel
Describes a creation member of a C# union.
public readonly struct UnionCaseDataModel
- Inherited Members
Properties
CreationMember
Gets the specific constructor or interface factory that creates this case.
public required IMethodSymbol CreationMember { get; init; }
Property Value
DeclaredType
Gets the case type in the context of the union's original definition.
public required ITypeSymbol DeclaredType { get; init; }
Property Value
IsNullable
Gets whether the creation parameter's nullable contract accepts null.
public required bool IsNullable { get; init; }
Property Value
TryGetValueMethod
Gets the public instance bool TryGetValue(out TCase) overload, when available.
public IMethodSymbol? TryGetValueMethod { get; init; }
Property Value
Type
Gets the case type after substituting the union's type arguments.
public required ITypeSymbol Type { get; init; }