Compartir a través de


ServiceProvider Constructor (IServiceProvider, Boolean)

Initializes a new instance of the ServiceProvider class with an existing IServiceProvider object and optionally passes all requests to the underlying service provider.

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.11.0 (in Microsoft.VisualStudio.Shell.11.0.dll)

Syntax

'Declaración
Public Sub New ( _
    sp As IServiceProvider, _
    defaultServices As Boolean _
)
public ServiceProvider(
    IServiceProvider sp,
    bool defaultServices
)

Parameters

Remarks

Initializes a new ServiceProvider and uses the provided IServiceProvider interface to resolve services. If defaultServices is equal to true (the default) a query for the IServiceProvider interface will return the underlying COM service provider and a query for the IObjectWithSite interface will return this object. If defaultServices is equal to false these two services will not be provided and the service provider will be "transparent" and pass all requests for services to the given service provider.

.NET Framework Security

See Also

Reference

ServiceProvider Class

ServiceProvider Overload

Microsoft.VisualStudio.Shell Namespace