使用英语阅读

通过


DesignerSerializationManager.GetService(Type) 方法

定义

获取请求的服务。

protected:
 virtual System::Object ^ GetService(Type ^ serviceType);
protected virtual object GetService (Type serviceType);
protected virtual object? GetService (Type serviceType);
abstract member GetService : Type -> obj
override this.GetService : Type -> obj
Protected Overridable Function GetService (serviceType As Type) As Object

参数

serviceType
Type

要检索的服务类型。

返回

所请求的服务,或者在无法解析服务的情况下为 null

注解

方法 GetService 提供对构造函数中设置的基础容器或服务提供程序的访问权限。

适用于

产品 版本
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9