PackageUtilities.QueryService PackageUtilities.QueryService PackageUtilities.QueryService PackageUtilities.QueryService PackageUtilities.QueryService Method

Definition

Overloads

QueryService(IServiceProvider, Guid) 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) 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) QueryService(IServiceProvider, Guid)

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

public:
[System::Runtime::CompilerServices::Extension]
 static System::Object ^ QueryService(Microsoft::VisualStudio::OLE::Interop::IServiceProvider ^ serviceProvider, Guid serviceGuid);
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

serviceGuid
Guid Guid Guid Guid Guid

Returns

The service, if found; otherwise null.

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

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

public:
generic <typename TService>
[System::Runtime::CompilerServices::Extension]
 static System::Object ^ QueryService(Microsoft::VisualStudio::OLE::Interop::IServiceProvider ^ serviceProvider);
public:
generic <typename TService>
[System::Runtime::CompilerServices::Extension]
 static Platform::Object ^ QueryService(Microsoft::VisualStudio::OLE::Interop::IServiceProvider ^ serviceProvider);
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

Returns

The service, if found; otherwise null.

Applies to