CaseIdsAttribute
class
Namespace: Orleans
Assigns case identifiers to the cases of a union type which has
GenerateSerializerAttribute applied. public sealed class CaseIdsAttribute : AttributeRemarks
Union values are serialized as tagged unions: the case identifier is encoded in the header of the field holding the case value. By default, each case is identified by its zero-based position in the union declaration. This attribute specifies one identifier per case, in declaration order, so that cases can be reordered or removed without changing the identifiers of the remaining cases.
Identifiers must be unique. Identifiers 0 through 6 are encoded without additional bytes.
A union type whose cases are the direct subtypes of a closed type, with the same case identifiers, has the same serialized representation as that closed type (see CaseAttribute). An empty union value is represented as a null closed-type value.
Constructors
CaseIdsAttribute(uint[])Initializes a new instance of theCaseIdsAttributeclass.
Properties
IdsGets the case identifiers, one per case in declaration order.
