IVsDataHostService.GetService Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetService<T>() |
Gets a global Visual Studio service of the specified type. |
GetService<T>(Guid) |
Gets a global Visual Studio service that is registered with the specified class ID that implements the specified interface. |
GetService<TService,TInterface>() |
Gets a global Visual Studio service of the specified type that implements the specified interface. |
GetService<T>()
Gets a global Visual Studio service of the specified type.
public:
generic <typename T>
T GetService();
public T GetService<T> ();
abstract member GetService : unit -> 'T
Public Function GetService(Of T) () As T
Type Parameters
- T
The service.
Returns
The service instance.
Exceptions
The service was not found.
Applies to
GetService<T>(Guid)
Gets a global Visual Studio service that is registered with the specified class ID that implements the specified interface.
public:
generic <typename T>
T GetService(Guid serviceGuid);
public T GetService<T> (Guid serviceGuid);
abstract member GetService : Guid -> 'T
Public Function GetService(Of T) (serviceGuid As Guid) As T
Type Parameters
- T
The interface.
Parameters
- serviceGuid
- Guid
The class ID of the service to retrieve.
Returns
The service instance.
Exceptions
The service was not found.
Applies to
GetService<TService,TInterface>()
Gets a global Visual Studio service of the specified type that implements the specified interface.
public:
generic <typename TService, typename TInterface>
TInterface GetService();
public TInterface GetService<TService,TInterface> ();
abstract member GetService : unit -> 'Interface
Public Function GetService(Of TService, TInterface) () As TInterface
Type Parameters
- TService
The service.
- TInterface
The interface.
Returns
The service instance.
Exceptions
The service was not found.