TextToSpeechClientExtensions.GetService<TService> 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.
Asks the ITextToSpeechClient for an object of type TService.
public static TService? GetService<TService>(this Microsoft.Extensions.AI.ITextToSpeechClient client, object? serviceKey = default);
static member GetService : Microsoft.Extensions.AI.ITextToSpeechClient * obj -> 'Service
<Extension()>
Public Function GetService(Of TService) (client As ITextToSpeechClient, Optional serviceKey As Object = Nothing) As TService
Type Parameters
- TService
The type of the object to be retrieved.
Parameters
- client
- ITextToSpeechClient
The client.
- serviceKey
- Object
An optional key that can be used to help identify the target service.
Returns
The found object, otherwise null.
Remarks
The purpose of this method is to allow for the retrieval of strongly typed services that may be provided by the ITextToSpeechClient, including itself or any services it might be wrapping.