13 references to GetService
Microsoft.Extensions.AI (3)
TextToSpeech\LoggingTextToSpeechClient.cs (2)
64
LogInvokedSensitive(nameof(GetAudioAsync), AsJson(options), AsJson(this.
GetService
<TextToSpeechClientMetadata>()));
104
LogInvokedSensitive(nameof(GetStreamingAudioAsync), AsJson(options), AsJson(this.
GetService
<TextToSpeechClientMetadata>()));
TextToSpeech\OpenTelemetryTextToSpeechClient.cs (1)
54
if (innerClient!.
GetService
<TextToSpeechClientMetadata>() is TextToSpeechClientMetadata metadata)
Microsoft.Extensions.AI.Abstractions.Tests (4)
TextToSpeech\DelegatingTextToSpeechClientTests.cs (3)
106
var client = delegating.
GetService
<DelegatingTextToSpeechClient>();
125
var client = delegating.
GetService
<ITextToSpeechClient>(expectedKey);
146
var tzi = delegating.
GetService
<TimeZoneInfo>(expectedKey);
TextToSpeech\TextToSpeechClientExtensionsTests.cs (1)
16
_ = TextToSpeechClientExtensions.
GetService
<object>(null!);
Microsoft.Extensions.AI.OpenAI.Tests (6)
OpenAITextToSpeechClientTests.cs (6)
39
var metadata = ttsClient.
GetService
<TextToSpeechClientMetadata>();
50
Assert.Same(ttsClient, ttsClient.
GetService
<ITextToSpeechClient>());
51
Assert.Same(audioClient, ttsClient.
GetService
<AudioClient>());
58
Assert.NotNull(pipeline.
GetService
<LoggingTextToSpeechClient>());
60
Assert.Same(audioClient, pipeline.
GetService
<AudioClient>());
61
Assert.IsType<LoggingTextToSpeechClient>(pipeline.
GetService
<ITextToSpeechClient>());