GrainId 结构

定义

标识粒度。

[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)
继承
GrainId
属性
实现

构造函数

GrainId(GrainType, IdSpan)

创建一个新的 GrainType 实例。

属性

IsDefault

true 如果此实例是默认值, false 则为 ;否则为 。

Key

获取 grain 键。

Type

获取粒度类型。

方法

CompareTo(GrainId)

标识粒度。

Create(GrainType, IdSpan)

创建一个新的 GrainType 实例。

Create(GrainType, String)

创建一个新的 GrainType 实例。

Create(String, String)

创建一个新的 GrainType 实例。

Equals(GrainId)

标识粒度。

Equals(Object)

标识粒度。

GetHashCode()

标识粒度。

GetObjectData(SerializationInfo, StreamingContext)

标识粒度。

GetUniformHashCode()

为粒度 ID 生成统一且稳定的哈希代码。

Parse(ReadOnlySpan<Char>, IFormatProvider)

分析 GrainId 范围中的 。

Parse(String)

分析 GrainId 字符串中的 。

Parse(String, IFormatProvider)

分析 GrainId 字符串中的 。

ToString()

标识粒度。

TryParse(ReadOnlySpan<Char>, IFormatProvider, GrainId)

尝试分析 GrainId 范围中的 。

TryParse(String, GrainId)

尝试从字符串中 GrainId 分析 。

TryParse(String, IFormatProvider, GrainId)

尝试从字符串中 GrainId 分析 。

运算符

Equality(GrainId, GrainId)

比较所提供的操作数是否相等。

Inequality(GrainId, GrainId)

比较所提供的操作数的不相等性。

显式接口实现

IFormattable.ToString(String, IFormatProvider)

标识粒度。

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

标识粒度。

扩展方法

GetGuidKey(GrainId)

返回 Guid grain 主键的表示形式。

GetGuidKey(GrainId, String)

返回 Guid grain 主键的表示形式。

GetIntegerKey(GrainId)

返回 Int64 grain 键的表示形式。

GetIntegerKey(GrainId, String)

返回 Int64 grain 键的表示形式。

TryGetGuidKey(GrainId, Guid, String)

尝试分析 Key 提供的 grain ID 的部分,以提取 Guid 密钥和 String 密钥扩展。

TryGetIntegerKey(GrainId, Int64, String)

尝试分析 Key 提供的 grain ID 的部分,以提取 Int64 密钥和 String 密钥扩展。

IsClient(GrainId)

true如果 ID 表示客户端,则返回 ;否则返回 false

IsSystemTarget(GrainId)

true如果 ID 表示系统目标,则返回 ;false否则返回 。

适用于