HostedFileClientExtensions.GetService<TService> 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.
Obtient un service du type spécifié à partir du client de fichiers.
public static TService? GetService<TService>(this Microsoft.Extensions.AI.IHostedFileClient client, object? serviceKey = default);
static member GetService : Microsoft.Extensions.AI.IHostedFileClient * obj -> 'Service
<Extension()>
Public Function GetService(Of TService) (client As IHostedFileClient, Optional serviceKey As Object = Nothing) As TService
Paramètres de type
- TService
Type de service à récupérer.
Paramètres
- client
- IHostedFileClient
Client de fichiers.
- serviceKey
- Object
Clé facultative qui peut être utilisée pour identifier le service cible.
Retours
Le service trouvé ou null s’il n’est pas disponible.
Exceptions
client a la valeur null.