Partager via


HostLanguageServices.GetService<TLanguageService> Méthode

Définition

Obtient un service spécifique au langage fourni par l’hôte identifié par le type de service. Si l’hôte ne fournit pas le service, cette méthode retourne null.

public:
generic <typename TLanguageService>
 where TLanguageService : Microsoft::CodeAnalysis::Host::ILanguageService abstract TLanguageService GetService();
public abstract TLanguageService GetService<TLanguageService> () where TLanguageService : Microsoft.CodeAnalysis.Host.ILanguageService;
public abstract TLanguageService? GetService<TLanguageService> () where TLanguageService : Microsoft.CodeAnalysis.Host.ILanguageService;
abstract member GetService : unit -> 'LanguageService (requires 'LanguageService :> Microsoft.CodeAnalysis.Host.ILanguageService)
Public MustOverride Function GetService(Of TLanguageService As ILanguageService) () As TLanguageService

Paramètres de type

TLanguageService

Retours

TLanguageService

S’applique à