GrainId Struct

Definition

Identifies a grain.

[Orleans.GenerateSerializer]
[Orleans.Immutable]
[System.Text.Json.Serialization.JsonConverter(typeof(Orleans.Runtime.GrainIdJsonConverter))]
[System.Serializable]
public readonly struct GrainId : IComparable<Orleans.Runtime.GrainId>, IEquatable<Orleans.Runtime.GrainId>, IParsable<Orleans.Runtime.GrainId>, ISpanFormattable, ISpanParsable<Orleans.Runtime.GrainId>, System.Runtime.Serialization.ISerializable
[<Orleans.GenerateSerializer>]
[<Orleans.Immutable>]
[<System.Text.Json.Serialization.JsonConverter(typeof(Orleans.Runtime.GrainIdJsonConverter))>]
[<System.Serializable>]
type GrainId = struct
    interface ISerializable
    interface ISpanFormattable
    interface IFormattable
    interface ISpanParsable<GrainId>
    interface IParsable<GrainId>
Public Structure GrainId
Implements IComparable(Of GrainId), IEquatable(Of GrainId), IParsable(Of GrainId), ISerializable, ISpanFormattable, ISpanParsable(Of GrainId)
Inheritance
GrainId
Attributes
Implements

Constructors

GrainId(GrainType, IdSpan)

Creates a new GrainType instance.

Properties

IsDefault

true if this instance is the default value, false if it is not.

Key

Gets the grain key.

Type

Gets the grain type.

Methods

CompareTo(GrainId)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

Create(GrainType, IdSpan)

Creates a new GrainType instance.

Create(GrainType, String)

Creates a new GrainType instance.

Create(String, String)

Creates a new GrainType instance.

Equals(GrainId)

Indicates whether the current object is equal to another object of the same type.

Equals(Object)

Indicates whether this instance and a specified object are equal.

GetHashCode()

Returns the hash code for this instance.

GetObjectData(SerializationInfo, StreamingContext)
Obsolete.

Populates a SerializationInfo with the data needed to serialize the target object.

GetUniformHashCode()

Generates a uniform, stable hash code for a grain id.

Parse(ReadOnlySpan<Char>, IFormatProvider)

Parses a GrainId from the span.

Parse(String)

Parses a GrainId from the string.

Parse(String, IFormatProvider)

Parses a GrainId from the string.

ToString()

Returns the fully qualified type name of this instance.

TryParse(ReadOnlySpan<Char>, IFormatProvider, GrainId)

Tries to parse a GrainId from the span.

TryParse(String, GrainId)

Tries to parse a GrainId from the string.

TryParse(String, IFormatProvider, GrainId)

Tries to parse a GrainId from the string.

Operators

Equality(GrainId, GrainId)

Compares the provided operands for equality.

Inequality(GrainId, GrainId)

Compares the provided operands for inequality.

Explicit Interface Implementations

IFormattable.ToString(String, IFormatProvider)
ISpanFormattable.TryFormat(Span<Char>, Int32, ReadOnlySpan<Char>, IFormatProvider)

Extension Methods

GetGuidKey(GrainId)

Returns the Guid representation of a grain primary key.

GetGuidKey(GrainId, String)

Returns the Guid representation of a grain primary key.

GetIntegerKey(GrainId)

Returns the Int64 representation of a grain key.

GetIntegerKey(GrainId, String)

Returns the Int64 representation of a grain key.

TryGetGuidKey(GrainId, Guid, String)

Tries to parse the Key portion of the provided grain id to extract a Guid key and String key extension.

TryGetIntegerKey(GrainId, Int64, String)

Tries to parse the Key portion of the provided grain id to extract a Int64 key and String key extension.

IsClient(GrainId)

Returns true if the id represents a client, false if not.

IsSystemTarget(GrainId)

Returns true if the id represents a system target, false if not.

Applies to