PackageUtilities.QueryService PackageUtilities.QueryService PackageUtilities.QueryService Method

Definition

Overloads

QueryService(IServiceProvider, Guid) QueryService(IServiceProvider, Guid) QueryService(IServiceProvider, Guid)

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

QueryService<TService>(IServiceProvider) QueryService<TService>(IServiceProvider) QueryService<TService>(IServiceProvider)

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

QueryService(IServiceProvider, Guid) QueryService(IServiceProvider, Guid) QueryService(IServiceProvider, Guid)

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

public static object QueryService (this Microsoft.VisualStudio.OLE.Interop.IServiceProvider serviceProvider, Guid serviceGuid);
static member QueryService : Microsoft.VisualStudio.OLE.Interop.IServiceProvider * Guid -> obj
<Extension()>
Public Function QueryService (serviceProvider As IServiceProvider, serviceGuid As Guid) As Object
Parameters
serviceProvider
IServiceProvider IServiceProvider IServiceProvider

The service provider to query.

serviceGuid
Guid Guid Guid
Returns

The service, if found; otherwise null.

QueryService<TService>(IServiceProvider) QueryService<TService>(IServiceProvider) QueryService<TService>(IServiceProvider)

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

public static object QueryService<TService> (this Microsoft.VisualStudio.OLE.Interop.IServiceProvider serviceProvider);
static member QueryService : Microsoft.VisualStudio.OLE.Interop.IServiceProvider -> obj
<Extension()>
Public Function QueryService(Of TService) (serviceProvider As IServiceProvider) As Object
Type Parameters
TService

The type whose GuidAttribute specifies the service GUID to query for.

Parameters
serviceProvider
IServiceProvider IServiceProvider IServiceProvider

The service provider to query.

Returns

The service, if found; otherwise null.

Applies to