ExternalDataExchangeService.GetService(Type) 方法
定义
获取指定接口类型的服务实现(如果服务可用)。Gets the service implementation of the specified interface type, if the service is available.
public:
System::Object ^ GetService(Type ^ serviceType);
public:
virtual System::Object ^ GetService(Type ^ serviceType);
public object GetService (Type serviceType);
public virtual object GetService (Type serviceType);
member this.GetService : Type -> obj
abstract member GetService : Type -> obj
override this.GetService : Type -> obj
Public Function GetService (serviceType As Type) As Object
Public Overridable Function GetService (serviceType As Type) As Object
参数
- serviceType
- Type
由要检索的服务实现的接口的 Type。The Type of the interface implemented by the service to retrieve.
返回
实现所请求服务的对象,或者在无法解析服务的情况下为 null(在 Visual Basic 中为 Nothing)。An object that implements the requested service, or null (Nothing in Visual Basic) if the service cannot be resolved.
例外
service 为空引用 (Nothing)。service is a null reference (Nothing).
此服务未向运行时注册。The service is not registered with the runtime.