ActivityExecutionContext.GetService 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | 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
參數
傳回
實作
例外狀況
這些 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
例外狀況
這些 ActivityExecutionContext 已經被處理掉了。