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
- sp
Type: Microsoft.VisualStudio.OLE.Interop.IServiceProvider
An IServiceProvider interface used to resolve services.
- defaultServices
Type: System.Boolean
Determines if this service should respond to queries for IServiceProvider and IObjectWithSite.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.