Skip to content

IdAttribute

class

Namespace: Orleans

Specifies the unique identity of a member.
public sealed class IdAttribute : Attribute

Remarks

Every serializable member in a type which has GenerateSerializerAttribute applied to it must have one IdAttribute attribute applied with a unique IdAttribute value. For positional records, this attribute can be applied directly to a primary constructor parameter instead of its generated property. On RPC method parameters, an explicit identifier overrides the parameter's zero-based ordinal among serialized parameters. Cancellation token parameters are excluded from serialized parameter ordinals, and all resulting identifiers must be unique.

Constructors

Properties

  • Id Gets the identifier.