HostedFileClientExtensions.GetService<TService> Método

Definição

Recebe um serviço do tipo especificado do cliente de ficheiros.

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

Parâmetros de Tipo Genérico

TService

O tipo de serviço a recuperar.

Parâmetros

client
IHostedFileClient

O cliente de ficheiros.

serviceKey
Object

Uma chave opcional que pode ser usada para ajudar a identificar o serviço-alvo.

Devoluções

TService

O serviço encontrado, ou null se não estiver disponível.

Exceções

client é null.

Aplica-se a