ActivityExecutionContext.GetService 方法

定義

多載

名稱 Description
GetService(Type)

回傳指定類型的服務。

GetService<T>()

回傳指定的 Type服務提供者。

GetService(Type)

回傳指定類型的服務。

public:
 virtual System::Object ^ GetService(Type ^ serviceType);
public object GetService(Type serviceType);
abstract member GetService : Type -> obj
override this.GetService : Type -> obj
Public Function GetService (serviceType As Type) As Object

參數

serviceType
Type

服務的一 Type 部分。

傳回

指定 的服務ObjectType

實作

例外狀況

這些 ActivityExecutionContext 已經被處理掉了。

適用於

GetService<T>()

回傳指定的 Type服務提供者。

public:
generic <typename T>
 T GetService();
public T GetService<T>();
member this.GetService : unit -> 'T
Public Function GetService(Of T) () As T

類型參數

T

提供者要回傳的指定類型。

傳回

T

指定 的服務提供者ObjectType

例外狀況

這些 ActivityExecutionContext 已經被處理掉了。

適用於