15 references to new
Microsoft.Extensions.AI.Abstractions.Tests (9)
Contents\AIContentTests.cs (2)
75
new
McpServerToolCallContent
("call123", "myTool", "myServer"),
77
new McpServerToolApprovalRequestContent("request123", new
McpServerToolCallContent
("call123", "myTool", "myServer")),
Contents\McpServerToolCallContentTests.cs (6)
15
McpServerToolCallContent c =
new
("callId1", "toolName", null);
29
McpServerToolCallContent c =
new
("callId1", "toolName", "serverName");
54
Assert.Throws<ArgumentException>("callId", () => new
McpServerToolCallContent
(string.Empty, "name", null));
55
Assert.Throws<ArgumentException>("toolName", () => new
McpServerToolCallContent
("callId1", string.Empty, null));
57
Assert.Throws<ArgumentNullException>("callId", () => new
McpServerToolCallContent
(null!, "name", null));
58
Assert.Throws<ArgumentNullException>("toolName", () => new
McpServerToolCallContent
("callId1", null!, null));
Contents\UserInputRequestContentTests.cs (1)
45
new McpServerToolApprovalRequestContent("request123", new
McpServerToolCallContent
("call123", "myTool", "myServer")),
Microsoft.Extensions.AI.OpenAI (3)
OpenAIResponsesChatClient.cs (3)
215
message.Contents.Add(new McpServerToolApprovalRequestContent(mtcari.Id,
new
(mtcari.Id, mtcari.ToolName, mtcari.ServerLabel)
454
yield return CreateUpdate(new McpServerToolApprovalRequestContent(mtcari.Id,
new
(mtcari.Id, mtcari.ToolName, mtcari.ServerLabel)
1377
contents.Add(new
McpServerToolCallContent
(mtci.Id, mtci.ToolName, mtci.ServerLabel)
Microsoft.Extensions.AI.Tests (3)
ChatCompletion\OpenTelemetryChatClientTests.cs (3)
618
new
McpServerToolCallContent
("mcp-call-1", "myTool", "myServer") { Arguments = new Dictionary<string, object?> { ["param1"] = "value1" } },
634
yield return new() { Contents = [new
McpServerToolCallContent
("mcp-call-1", "myTool", "myServer") { Arguments = new Dictionary<string, object?> { ["param1"] = "value1" } }] };
780
var toolCall = new
McpServerToolCallContent
("mcp-call-2", "dangerousTool", "secureServer")