3 overrides of GetService
Microsoft.Extensions.AI.Abstractions (2)
Functions\DelegatingAIFunction.cs (1)
61public override object? GetService(Type serviceType, object? serviceKey = null)
Functions\DelegatingAIFunctionDeclaration.cs (1)
48public override object? GetService(Type serviceType, object? serviceKey = null)
Microsoft.Extensions.AI.OpenAI (1)
OpenAIResponsesChatClient.cs (1)
902public override object? GetService(Type serviceType, object? serviceKey = null)
9 references to GetService
Microsoft.Extensions.AI.Abstractions (3)
Functions\DelegatingAIFunction.cs (1)
67InnerFunction.GetService(serviceType, serviceKey);
Functions\DelegatingAIFunctionDeclaration.cs (1)
54InnerFunction.GetService(serviceType, serviceKey);
Tools\AITool.cs (1)
61GetService(typeof(TService), serviceKey) is TService service ? service : default;
Microsoft.Extensions.AI.Abstractions.Tests (5)
Tools\AIToolTests.cs (5)
26Assert.Throws<ArgumentNullException>("serviceType", () => tool.GetService(null!)); 28Assert.Same(tool, tool.GetService(typeof(object))); 29Assert.Same(tool, tool.GetService(typeof(AITool))); 30Assert.Same(tool, tool.GetService(typeof(DerivedAITool))); 36Assert.Null(tool.GetService(typeof(string)));
Microsoft.Extensions.AI.OpenAI (1)
OpenAIResponsesChatClient.cs (1)
908base.GetService(serviceType, serviceKey);