IVsDataHostService.GetService Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Surcharges
| GetService<T>() |
Obtient un service Visual Studio global du type spécifié. |
| GetService<T>(Guid) |
Obtient un service Visual Studio global inscrit avec l’ID de classe spécifié qui implémente l’interface spécifiée. |
| GetService<TService,TInterface>() |
Obtient un service Visual Studio global du type spécifié qui implémente l’interface spécifiée. |
GetService<T>()
Obtient un service Visual Studio global du type spécifié.
public:
generic <typename T>
T GetService();
public T GetService<T> ();
abstract member GetService : unit -> 'T
Public Function GetService(Of T) () As T
Paramètres de type
- T
Service.
Retours
- T
Instance de service.
Exceptions
Le service est introuvable.
S’applique à
GetService<T>(Guid)
Obtient un service Visual Studio global inscrit avec l’ID de classe spécifié qui implémente l’interface spécifiée.
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
Paramètres de type
- T
Interface.
Paramètres
- serviceGuid
- Guid
ID de classe du service à récupérer.
Retours
- T
Instance de service.
Exceptions
Le service est introuvable.
S’applique à
GetService<TService,TInterface>()
Obtient un service Visual Studio global du type spécifié qui implémente l’interface spécifiée.
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
Paramètres de type
- TService
Service.
- TInterface
Interface.
Retours
- TInterface
Instance de service.
Exceptions
Le service est introuvable.