Share via


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

取得粒紋索引鍵。

Type

取得粒紋類型。

方法

CompareTo(GrainId)

識別粒紋。

Create(GrainType, IdSpan)

建立新的 GrainType 執行個體。

Create(GrainType, String)

建立新的 GrainType 執行個體。

Create(String, String)

建立新的 GrainType 執行個體。

Equals(GrainId)

識別粒紋。

Equals(Object)

識別粒紋。

GetHashCode()

識別粒紋。

GetObjectData(SerializationInfo, StreamingContext)

識別粒紋。

GetUniformHashCode()

產生粒紋標識碼的統一穩定哈希碼。

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 回粒紋主鍵的表示。

GetGuidKey(GrainId, String)

Guid 回粒紋主鍵的表示。

GetIntegerKey(GrainId)

Int64 回粒紋索引鍵的表示。

GetIntegerKey(GrainId, String)

Int64 回粒紋索引鍵的表示。

TryGetGuidKey(GrainId, Guid, String)

嘗試剖析 Key 所提供之粒紋標識碼的部分,以擷取 Guid 密鑰和 String 金鑰延伸模組。

TryGetIntegerKey(GrainId, Int64, String)

嘗試剖析 Key 所提供之粒紋標識碼的部分,以擷取 Int64 密鑰和 String 金鑰延伸模組。

IsClient(GrainId)

true如果識別子代表用戶端,false則傳回 ,否則傳回 。

IsSystemTarget(GrainId)

true如果識別子代表系統目標,false則傳回 ,否則傳回 。

適用於