PackageUtilities.QueryService Method (IServiceProvider, Guid)

Visual Studio 2015
 

Gets a service exposed by a service provider based on its service type.

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

<ExtensionAttribute>
Public Shared Function QueryService (
	serviceProvider As IServiceProvider,
	serviceGuid As Guid
) As Object

Parameters

serviceProvider
Type: Microsoft.VisualStudio.OLE.Interop.IServiceProvider

The service provider to query.

serviceGuid
Type: System.Guid

Return Value

Type: System.Object

The service, if found; otherwise null.

Return to top
Show: