ServiceContainer 建構函式

定義

初始化 ServiceContainer 類別的新執行個體。Initializes a new instance of the ServiceContainer class.

多載

ServiceContainer()

初始化 ServiceContainer 類別的新執行個體。Initializes a new instance of the ServiceContainer class.

ServiceContainer(IServiceProvider)

使用指定的父服務提供者,初始化 ServiceContainer 類別的新執行個體。Initializes a new instance of the ServiceContainer class using the specified parent service provider.

ServiceContainer()

初始化 ServiceContainer 類別的新執行個體。Initializes a new instance of the ServiceContainer class.

public:
 ServiceContainer();
public ServiceContainer ();
Public Sub New ()

ServiceContainer(IServiceProvider)

使用指定的父服務提供者,初始化 ServiceContainer 類別的新執行個體。Initializes a new instance of the ServiceContainer class using the specified parent service provider.

public:
 ServiceContainer(IServiceProvider ^ parentProvider);
public ServiceContainer (IServiceProvider parentProvider);
new System.ComponentModel.Design.ServiceContainer : IServiceProvider -> System.ComponentModel.Design.ServiceContainer
Public Sub New (parentProvider As IServiceProvider)

參數

parentProvider
IServiceProvider

父服務提供者。A parent service provider.

備註

服務容器會使用此服務物件提供者來抓取服務(如果容器中的本機無法使用)。The service container uses this service object provider to retrieve services, if they are not available locally in the container.

適用於