Share via


GrainReference 類別

定義

這是所有粒紋參考的基類。

[System.Serializable]
public class GrainReference : IEquatable<Orleans.Runtime.GrainReference>, Orleans.Runtime.IAddressable, System.Runtime.Serialization.ISerializable
[Orleans.Alias("GrainRef")]
[Orleans.DefaultInvokableBaseType(typeof(System.Threading.Tasks.ValueTask<>), typeof(Orleans.Runtime.Request<>))]
[Orleans.DefaultInvokableBaseType(typeof(System.Threading.Tasks.ValueTask), typeof(Orleans.Runtime.Request))]
[Orleans.DefaultInvokableBaseType(typeof(System.Threading.Tasks.Task<>), typeof(Orleans.Runtime.TaskRequest<>))]
[Orleans.DefaultInvokableBaseType(typeof(System.Threading.Tasks.Task), typeof(Orleans.Runtime.TaskRequest))]
[Orleans.DefaultInvokableBaseType(typeof(System.Void), typeof(Orleans.Runtime.VoidRequest))]
[Orleans.DefaultInvokableBaseType(typeof(System.Collections.Generic.IAsyncEnumerable<>), typeof(Orleans.Runtime.AsyncEnumerableRequest<>))]
public class GrainReference : IEquatable<Orleans.Runtime.GrainReference>, ISpanFormattable, Orleans.Runtime.IAddressable
[<System.Serializable>]
type GrainReference = class
    interface IAddressable
    interface IEquatable<GrainReference>
    interface ISerializable
[<Orleans.Alias("GrainRef")>]
[<Orleans.DefaultInvokableBaseType(typeof(System.Threading.Tasks.ValueTask<>), typeof(Orleans.Runtime.Request<>))>]
[<Orleans.DefaultInvokableBaseType(typeof(System.Threading.Tasks.ValueTask), typeof(Orleans.Runtime.Request))>]
[<Orleans.DefaultInvokableBaseType(typeof(System.Threading.Tasks.Task<>), typeof(Orleans.Runtime.TaskRequest<>))>]
[<Orleans.DefaultInvokableBaseType(typeof(System.Threading.Tasks.Task), typeof(Orleans.Runtime.TaskRequest))>]
[<Orleans.DefaultInvokableBaseType(typeof(System.Void), typeof(Orleans.Runtime.VoidRequest))>]
[<Orleans.DefaultInvokableBaseType(typeof(System.Collections.Generic.IAsyncEnumerable<>), typeof(Orleans.Runtime.AsyncEnumerableRequest<>))>]
type GrainReference = class
    interface IAddressable
    interface IEquatable<GrainReference>
    interface ISpanFormattable
    interface IFormattable
Public Class GrainReference
Implements IAddressable, IEquatable(Of GrainReference), ISerializable
Public Class GrainReference
Implements IAddressable, IEquatable(Of GrainReference), ISpanFormattable
繼承
GrainReference
屬性
實作

建構函式

GrainReference(GrainReference)

建構粒紋參考的複本。

GrainReference(GrainReference, InvokeMethodOptions)

這是所有粒紋參考的基類。

GrainReference(GrainReferenceShared, IdSpan)

初始化 GrainReference 類別的新執行個體。

GrainReference(SerializationInfo, StreamingContext)

這是所有粒紋參考的基類。

欄位

SystemTargetSilo

從產生的程式代碼呼叫。

屬性

CodecProvider

取得串行化編解碼器提供者。

CopyContextPool

取得串行化複製內容集區。

GrainId

取得粒紋標識碼。

GrainIdentity

這是所有粒紋參考的基類。

GrainServiceSiloAddress

這是所有粒紋參考的基類。

InterfaceId

由產生的子類別實作,以傳回在產生的程式代碼中實作的常數。

InterfaceName

取得介面名稱。

InterfaceType

取得介面類型。

InterfaceVersion

取得介面版本。

IsGrainService

這是所有粒紋參考的基類。

IsInitializedSystemTarget

系統目標的運行時間環境是否已初始化。 從產生的程式代碼呼叫。

方法

Cast<TGrainInterface>()

建立實作指定之粒紋介面的新粒紋參考。

CopyGrainReference(Object, ICopyContext)

用於粒紋參考的複製器函式。

DeserializeGrainReference(Type, IDeserializationContext)

用於粒紋參考的還原串行化程式函式。

Equals(GrainReference)

這是所有粒紋參考的基類。

Equals(Object)

測試這個參考是否與另一個物件相等。 如果兩個粒紋參考都參考相同的粒紋,則兩個粒紋參考相等。

GetHashCode()

計算粒紋參考的哈希碼。

GetInvokable<TInvokable>()

這是所有粒紋參考的基類。

GetMethodName(Int32, Int32)

傳回與指定之 interfaceId 和 methodId 值相關聯的方法名稱。

GetObjectData(SerializationInfo, StreamingContext)

這是所有粒紋參考的基類。

GetUniformHashCode()

取得此粒紋參考的統一哈希程序代碼。

Invoke(IRequest)

叫用提供的方法。

InvokeAsync(IRequest)

叫用提供的方法。

InvokeAsync<T>(IRequest)

叫用提供的方法。

InvokeMethodAsync<T>(Int32, Object[], InvokeMethodOptions, SiloAddress)

從產生的程式代碼呼叫。

InvokeOneWayMethod(Int32, Object[], InvokeMethodOptions, SiloAddress)

從產生的程式代碼呼叫。

IsCompatible(Int32)

在產生的程式代碼中實作。

SerializeGrainReference(Object, ISerializationContext, Type)

用於粒紋參考的串行化程式函式。

ToKeyInfo()

這是所有粒紋參考的基類。

ToKeyString()

取得此粒紋的索引鍵值,做為字串。

ToString()

傳回這個參考的字串表示。

運算子

Equality(GrainReference, GrainReference)

比較兩個相等參考。 如果兩個粒紋參考都參考相同的粒紋,則兩個粒紋參考相等。

Inequality(GrainReference, GrainReference)

比較兩個不相等的參考。 如果兩個粒紋參考都參考相同的粒紋,則兩個粒紋參考相等。

明確介面實作

IFormattable.ToString(String, IFormatProvider)

這是所有粒紋參考的基類。

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

這是所有粒紋參考的基類。

擴充方法

AsReference(IAddressable, Type)

傳回所提供之粒紋的具型別參考。

AsReference<TGrainInterface>(IAddressable)

傳回所提供之粒紋的具型別參考。

BindGrainReference(IAddressable, IGrainFactory)

將粒紋參考系結至提供的 IGrainFactory

Cast(IAddressable, Type)

傳回所提供之粒紋的具型別參考。

Cast<TGrainInterface>(IAddressable)

傳回所提供之粒紋的具型別參考。

GetGrainId(IAddressable)

傳回對應至所提供粒紋的粒紋標識碼。

GetPrimaryKey(IAddressable)

Guid 回粒紋主鍵的表示。

GetPrimaryKey(IAddressable, String)

Guid 回粒紋主鍵的表示。

GetPrimaryKeyLong(IAddressable)

long 回粒紋主鍵的表示。

GetPrimaryKeyLong(IAddressable, String)

long 回粒紋主鍵的表示。

GetPrimaryKeyString(IAddressable)

string 回粒紋的主鍵。

IsPrimaryKeyBasedOnLong(IAddressable)

傳回主鍵的一部分是否為類型 long

ToShortKeyString(GrainReference)

作為 ToKeyString 唯一的粒度參考索引鍵字串,但較短且可剖析。 適用於唯一性和簡潔性很重要的地方。

適用於