Class UnionCaseContract
- Namespace
- ShapeShift.Schema
- Assembly
- ShapeShift.dll
Describes one case of a UnionContract.
public sealed class UnionCaseContract
- Inheritance
-
UnionCaseContract
- Inherited Members
Constructors
UnionCaseContract(string, int, DataContract)
Describes one case of a UnionContract.
public UnionCaseContract(string name, int tag, DataContract type)
Parameters
namestringThe name of the union case.
tagintThe integer tag assigned to the union case.
typeDataContractThe contract for the value carried by this case.
Properties
IsTagSpecified
Gets a value indicating whether Tag was explicitly assigned and is therefore used as the discriminator when writing.
public bool IsTagSpecified { get; init; }
Property Value
Remarks
Name
Gets the name of the union case.
public string Name { get; }
Property Value
Tag
Gets the integer tag assigned to the union case.
public int Tag { get; }
Property Value
Type
Gets the contract for the value carried by this case.
public DataContract Type { get; }
Property Value
Methods
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.