UniqueKey
class
Namespace: Orleans.Runtime
Represents the composite key used by the legacy Orleans grain identifier encoding.
[Orleans.GenerateSerializer][Orleans.Immutable][Orleans.SuppressReferenceTracking][System.Text.Json.Serialization.JsonConverter(Orleans.Runtime.UniqueKeyJsonConverter)]public sealed class UniqueKey : IComparable<UniqueKey>, IEquatable<UniqueKey>Constructors
Properties
BaseTypeCodeGets the 32-bit legacy type code.HasKeyExtGets a value indicating whether this key has a primary key extension.IdCategoryGets the identifier category encoded inUniqueKey.IsLongKeyGets a value indicating whether the primary key is encoded as aSystem.Int64.IsSystemTargetKeyGets a value indicating whether this key represents a system target.KeyExtGets the optional primary key extension.N0Gets the first 64 bits of the primary key.N1Gets the second 64 bits of the primary key.TypeCodeDataGets the packed category and type code data.
Methods
CompareTo(UniqueKey?)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.Equals(UniqueKey?)Indicates whether the current object is equal to another object of the same type.Equals(object?)Determines whether the specified object is equal to the current object.GetHashCodeServes as the default hash function.NewGrainServiceKey(short, long)Creates a grain service key with an integer primary key.NewGrainServiceKey(string, long)Creates a grain service key with a string primary key extension.NewKeyCreates a key with a randomly generated GUID primary key.NewSystemTargetKey(Guid, long)Creates a system target key with a GUID primary key.NewSystemTargetKey(short)Creates a system target key from a system identifier.PrimaryKeyToGuidGets the GUID primary key of a key without an extension.PrimaryKeyToGuid(string?)Gets the GUID primary key and its optional key extension.PrimaryKeyToLongGets the integer primary key of a key without an extension.PrimaryKeyToLong(string?)Gets the integer primary key and its optional key extension.ToStringReturns a string that represents the current object.
