WorkflowView.GetService(Type) 方法

定义

获取指定类型的服务对象(如果可用)。

protected:
 override System::Object ^ GetService(Type ^ serviceType);
protected override object GetService(Type serviceType);
override this.GetService : Type -> obj
Protected Overrides Function GetService (serviceType As Type) As Object

参数

serviceType
Type

Type要检索的服务。

返回

如果 serviceTypetypeof(CommandID),则 GetService 返回特定的 CommandID;否则,GetService返回实现所请求服务的 Object;如果无法解析服务,则返回 null 引用(Nothing Visual Basic)。

注解

GetService 如果无法解析服务,则 Object 返回实现请求的服务,或者返回 null 引用 (Nothing)。

适用于