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.14.0 (in Microsoft.VisualStudio.Shell.14.0.dll)

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.

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.

Return to top
Show: