LegacyGrainId
class
Namespace: Orleans.Runtime
Represents an identifier using the legacy Orleans grain identity encoding.
[Orleans.GenerateSerializer][Orleans.Immutable]public sealed class LegacyGrainId : IComparable<LegacyGrainId>, IEquatable<LegacyGrainId>Properties
CategoryGets the category encoded in this identifier.IdentityStringGets a detailed string representation of this identifier.IsClientGets a value indicating whether this identifier represents a client.IsGrainGets a value indicating whether this identifier represents a grain.IsLongKeyGets a value indicating whether the primary key is encoded as aSystem.Int64.IsSystemTargetGets a value indicating whether this identifier represents a system target.PrimaryKeyGets the GUID primary key.PrimaryKeyLongGets the integer primary key.PrimaryKeyStringGets the string primary key extension, or an empty string if this identifier has no key extension.TypeCodeGets the legacy grain type code.
Methods
CompareTo(LegacyGrainId?)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.CreateGrainTypeForGrain(int)Creates theGrainTyperepresentation of a legacy grain type code.CreateGrainTypeForSystemTarget(int)Creates theGrainTyperepresentation of a legacy system target type code.Equals(LegacyGrainId?)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.FromGrainId(GrainId)Converts aGrainIdwhich uses the legacy grain identifier encoding.GetHashCodeServes as the default hash function.GetHashCode_Modulo(uint)Gets a non-negative hash code reduced modulo the specified value.GetPrimaryKey(string?)Gets the GUID primary key and its optional key extension.GetPrimaryKeyLong(string?)Gets the integer primary key and its optional key extension.GetUniformHashCodeGet a uniformly distributed hash code value for this grain, based on Jenkins Hash function. NOTE: Hash code value may be positive or NEGATIVE.IsLegacyGrainType(Type)Determines whether a type uses one of the legacy grain key interfaces.IsLegacyKeyExtGrainType(Type)Determines whether a type uses a legacy compound grain key interface.NewClientIdCreates a client identifier with a randomly generated primary key.NewIdCreates a grain identifier with a randomly generated primary key.ToGrainIdConverts this legacy identifier to itsGrainIdrepresentation.ToStringReturns a string that represents the current object.TryConvertFromGrainId(GrainId, LegacyGrainId?)Attempts to convert aGrainIdwhich uses the legacy grain identifier encoding.implicit operator GrainId(LegacyGrainId)Converts a legacy grain identifier to itsGrainIdrepresentation.
