Share via


SystemTarget 類別

定義

各種系統服務的基類,例如粒紋目錄、提醒服務等。讓 GrainService 公開繼承自它。 在重構之後,可以轉換成內部,以移除繼承關聯性。

public abstract class SystemTarget : Orleans.ISystemTarget
public abstract class SystemTarget : IEquatable<Orleans.Runtime.IGrainContext>, Orleans.ISystemTarget
public abstract class SystemTarget : IDisposable, IEquatable<Orleans.Runtime.IGrainContext>, ISpanFormattable, Orleans.ISystemTarget, Orleans.Runtime.IGrainExtensionBinder, Orleans.Serialization.Invocation.ITargetHolder
type SystemTarget = class
    interface ISystemTarget
    interface IAddressable
type SystemTarget = class
    interface ISystemTarget
    interface IAddressable
    interface IEquatable<IGrainContext>
type SystemTarget = class
    interface ISystemTarget
    interface IAddressable
    interface IGrainContext
    interface ITargetHolder
    interface IEquatable<IGrainContext>
    interface IGrainExtensionBinder
    interface ISpanFormattable
    interface IFormattable
    interface IDisposable
Public MustInherit Class SystemTarget
Implements ISystemTarget
Public MustInherit Class SystemTarget
Implements IEquatable(Of IGrainContext), ISystemTarget
Public MustInherit Class SystemTarget
Implements IDisposable, IEquatable(Of IGrainContext), IGrainExtensionBinder, ISpanFormattable, ISystemTarget, ITargetHolder
繼承
SystemTarget
衍生
實作

建構函式

SystemTarget()

只需要讓反映快樂。

屬性

ActivationServices

取得 , IServiceProvider 提供對粒紋啟用服務容器的存取權。

Deactivated

Task取得當粒紋已停用時完成的 。

GrainId

取得粒紋身分識別。

GrainReference

取得這個粒紋的參考。

IsLowPriority

各種系統服務的基類,例如粒紋目錄、提醒服務等。讓 GrainService 公開繼承自它。 在重構之後,可以轉換成內部,以移除繼承關聯性。

Scheduler

取得排程器。

Silo

系統目標的尋址接收器位址。

方法

Activate(Dictionary<String,Object>, Nullable<CancellationToken>)

開始啟動此實例。

Deactivate(DeactivationReason, Nullable<CancellationToken>)

開始停用此實例。

Dispose()

各種系統服務的基類,例如粒紋目錄、提醒服務等。讓 GrainService 公開繼承自它。 在重構之後,可以轉換成內部,以移除繼承關聯性。

GetComponent<TComponent>()

取得具有指定型別的元件。

GetExtension<TExtensionInterface>()

傳回為所提供 TExtensionInterface註冊的粒紋延伸模組。

GetOrSetExtension<TExtension,TExtensionInterface>(Func<TExtension>)

如果尚未完成,請將延伸模組系結至可尋址的物件。

GetTarget<TTarget>()

取得目標。

Migrate(Dictionary<String,Object>, Nullable<CancellationToken>)

各種系統服務的基類,例如粒紋目錄、提醒服務等。讓 GrainService 公開繼承自它。 在重構之後,可以轉換成內部,以移除繼承關聯性。

ReceiveMessage(Object)

將傳入訊息提交至這個實例。

RegisterTimer(Func<Object,Task>, Object, TimeSpan, TimeSpan, String)

註冊定時器以將一般回呼傳送至此粒紋。 此定時器會讓目前的粒紋無法停用。

Rehydrate(IRehydrationContext)

各種系統服務的基類,例如粒紋目錄、提醒服務等。讓 GrainService 公開繼承自它。 在重構之後,可以轉換成內部,以移除繼承關聯性。

SetComponent<TComponent>(TComponent)

將提供的 值設定為 型 TComponent別的元件。

ToString()

物件的覆寫。ToString ()

明確介面實作

IEquatable<IGrainContext>.Equals(IGrainContext)

各種系統服務的基類,例如粒紋目錄、提醒服務等。讓 GrainService 公開繼承自它。 在重構之後,可以轉換成內部,以移除繼承關聯性。

IFormattable.ToString(String, IFormatProvider)

各種系統服務的基類,例如粒紋目錄、提醒服務等。讓 GrainService 公開繼承自它。 在重構之後,可以轉換成內部,以移除繼承關聯性。

IGrainContext.ActivationId

取得啟用標識碼。

IGrainContext.Address

取得啟用位址。

IGrainContext.GrainInstance

取得粒紋實例,如果尚未設定粒紋實例,則 null 為 。

IGrainContext.ObservableLifecycle

取得可 Grain 觀察的生命週期,可用來新增生命週期勾點。

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

各種系統服務的基類,例如粒紋目錄、提醒服務等。讓 GrainService 公開繼承自它。 在重構之後,可以轉換成內部,以移除繼承關聯性。

ITargetHolder.GetComponent<TComponent>()

取得具有指定型別的元件。

擴充方法

GetGrainExtension<TComponent>(IGrainContext)

由產生的介面程序代碼使用 IGrainExtension

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

DeactivateAsync(IGrainContext, DeactivationReason, Nullable<CancellationToken>)

停用提供的粒紋。

ScheduleTask(SystemTarget, Action)

排程 在上SystemTargetOrleans.Runtime.ISchedulingContext提供的 action

ScheduleTask(SystemTarget, Func<Task>)

排程 在上SystemTargetOrleans.Runtime.ISchedulingContext提供的 action

ScheduleTask<T>(SystemTarget, Func<Task<T>>)

排程 上SystemTarget提供的 action

適用於