语言

WorkflowRuntimeEndpoint.GetService 方法

定义

重载

名称 说明
GetService(Type)

从服务对象列表中获取指定服务类型的服务对象。

GetService<T>()

获取与指定为模板参数的服务类型对应的服务对象。

GetService(Type)

从服务对象列表中获取指定服务类型的服务对象。

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

参数

serviceType
Type

必须从对象列表中检索其对象的服务的类型。

返回

指定服务类型的服务对象。

适用于

GetService<T>()

获取与指定为模板参数的服务类型对应的服务对象。

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

类型参数

T

要获取的服务的类型。

返回

T

对应于服务类型的服务对象。

适用于