42 instantiations of McpServerToolCallContent
Microsoft.Extensions.AI.Abstractions (1)
Microsoft.Extensions.AI.Abstractions.Tests (16)
Contents\AIContentTests.cs (3)
79new McpServerToolCallContent("call123", "myTool", "myServer"),
81new ToolApprovalRequestContent("request123", new McpServerToolCallContent("call123", "myTool", "myServer")),
82new ToolApprovalResponseContent("request123", approved: true, new McpServerToolCallContent("call456", "myTool2", "myServer2")),
Contents\McpServerToolCallContentTests.cs (7)
16McpServerToolCallContent c = new("callId1", "toolName", null);
30McpServerToolCallContent c = new("callId1", "toolName", "serverName");
55Assert.Throws<ArgumentException>("callId", () => new McpServerToolCallContent(string.Empty, "name", null));
56Assert.Throws<ArgumentException>("name", () => new McpServerToolCallContent("callId1", string.Empty, null));
58Assert.Throws<ArgumentNullException>("callId", () => new McpServerToolCallContent(null!, "name", null));
59Assert.Throws<ArgumentNullException>("name", () => new McpServerToolCallContent("callId1", null!, null));
65var content = new McpServerToolCallContent("call123", "myTool", "myServer")
Microsoft.Extensions.AI.Evaluation.Reporting (1)
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (1)
Microsoft.Extensions.AI.OpenAI (6)
Microsoft.Extensions.AI.OpenAI.Tests (1)
Microsoft.Extensions.AI.Stabilization.Tests (1)
Microsoft.Extensions.AI.Tests (15)
ChatCompletion\FunctionInvokingChatClientApprovalsTests.cs (11)
1744new ToolApprovalRequestContent("callId2", new McpServerToolCallContent("callId2", "McpCall", "myServer"))
1753new ToolApprovalRequestContent("callId2", new McpServerToolCallContent("callId2", "McpCall", "myServer"))
1783new ToolApprovalRequestContent("callId2", new McpServerToolCallContent("callId2", "McpCall", "myServer"))
1788new ToolApprovalResponseContent("callId2", true, new McpServerToolCallContent("callId2", "McpCall", "myServer"))
1797new ToolApprovalRequestContent("callId2", new McpServerToolCallContent("callId2", "McpCall", "myServer"))
1809new ToolApprovalResponseContent("callId2", true, new McpServerToolCallContent("callId2", "McpCall", "myServer"))
1867new ToolApprovalRequestContent("callId2", new McpServerToolCallContent("callId2", "McpCall", "myServer"))
1872new ToolApprovalResponseContent("callId2", approveMcpCall, new McpServerToolCallContent("callId2", "McpCall", "myServer"))
1880new ToolApprovalRequestContent("callId2", new McpServerToolCallContent("callId2", "McpCall", "myServer"))
1894new ToolApprovalResponseContent("callId2", approveMcpCall, new McpServerToolCallContent("callId2", "McpCall", "myServer"))
2094McpServerToolCallContent mstcc => new McpServerToolCallContent(mstcc.CallId, mstcc.Name, mstcc.ServerName)
188 references to McpServerToolCallContent
Microsoft.Extensions.AI (4)
Microsoft.Extensions.AI.Abstractions (24)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.McpServerToolCallContent.g.cs (20)
15private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.McpServerToolCallContent>? _McpServerToolCallContent;
21public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.McpServerToolCallContent> McpServerToolCallContent
24get => _McpServerToolCallContent ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.McpServerToolCallContent>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent));
27private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.McpServerToolCallContent> Create_McpServerToolCallContent(global::System.Text.Json.JsonSerializerOptions options)
29if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.McpServerToolCallContent>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.McpServerToolCallContent> jsonTypeInfo))
31var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.McpServerToolCallContent>
37ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(string), typeof(string), typeof(string)}, modifiers: null),
41jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.Extensions.AI.McpServerToolCallContent>(options, objectInfo);
58DeclaringType = typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent),
60Getter = static obj => ((global::Microsoft.Extensions.AI.McpServerToolCallContent)obj).Name,
68AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent).GetProperty("Name", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
79DeclaringType = typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent),
81Getter = static obj => ((global::Microsoft.Extensions.AI.McpServerToolCallContent)obj).ServerName,
89AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent).GetProperty("ServerName", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
99DeclaringType = typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent),
101Getter = static obj => ((global::Microsoft.Extensions.AI.McpServerToolCallContent)obj).Arguments,
102Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.McpServerToolCallContent)obj).Arguments = value!,
109AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent).GetProperty("Arguments", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IDictionary<string, object>), global::System.Array.Empty<global::System.Type>(), null),
Microsoft.Extensions.AI.Abstractions.Tests (32)
Generated\361d1da7f942c932\TestJsonSerializerContext.McpServerToolCallContent.g.cs (20)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.McpServerToolCallContent>? _McpServerToolCallContent;
19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.McpServerToolCallContent> McpServerToolCallContent
22get => _McpServerToolCallContent ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.McpServerToolCallContent>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent));
25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.McpServerToolCallContent> Create_McpServerToolCallContent(global::System.Text.Json.JsonSerializerOptions options)
27if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.McpServerToolCallContent>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.McpServerToolCallContent> jsonTypeInfo))
29var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.McpServerToolCallContent>
35ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(string), typeof(string), typeof(string)}, modifiers: null),
39jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.Extensions.AI.McpServerToolCallContent>(options, objectInfo);
56DeclaringType = typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent),
58Getter = static obj => ((global::Microsoft.Extensions.AI.McpServerToolCallContent)obj).Name,
66AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent).GetProperty("Name", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
77DeclaringType = typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent),
79Getter = static obj => ((global::Microsoft.Extensions.AI.McpServerToolCallContent)obj).ServerName,
87AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent).GetProperty("ServerName", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
97DeclaringType = typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent),
99Getter = static obj => ((global::Microsoft.Extensions.AI.McpServerToolCallContent)obj).Arguments,
100Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.McpServerToolCallContent)obj).Arguments = value!,
107AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent).GetProperty("Arguments", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IDictionary<string, object>), global::System.Array.Empty<global::System.Type>(), null),
Microsoft.Extensions.AI.Evaluation.Reporting (21)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.McpServerToolCallContent.g.cs (20)
15private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.McpServerToolCallContent>? _McpServerToolCallContent;
21public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.McpServerToolCallContent> McpServerToolCallContent
24get => _McpServerToolCallContent ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.McpServerToolCallContent>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent));
27private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.McpServerToolCallContent> Create_McpServerToolCallContent(global::System.Text.Json.JsonSerializerOptions options)
29if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.McpServerToolCallContent>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.McpServerToolCallContent> jsonTypeInfo))
31var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.McpServerToolCallContent>
37ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(string), typeof(string), typeof(string)}, modifiers: null),
41jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.Extensions.AI.McpServerToolCallContent>(options, objectInfo);
58DeclaringType = typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent),
60Getter = static obj => ((global::Microsoft.Extensions.AI.McpServerToolCallContent)obj).Name,
68AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent).GetProperty("Name", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
79DeclaringType = typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent),
81Getter = static obj => ((global::Microsoft.Extensions.AI.McpServerToolCallContent)obj).ServerName,
89AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent).GetProperty("ServerName", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
99DeclaringType = typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent),
101Getter = static obj => ((global::Microsoft.Extensions.AI.McpServerToolCallContent)obj).Arguments,
102Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.McpServerToolCallContent)obj).Arguments = value!,
109AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent).GetProperty("Arguments", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IDictionary<string, object>), global::System.Array.Empty<global::System.Type>(), null),
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (21)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.McpServerToolCallContent.g.cs (20)
15private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.McpServerToolCallContent>? _McpServerToolCallContent;
21public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.McpServerToolCallContent> McpServerToolCallContent
24get => _McpServerToolCallContent ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.McpServerToolCallContent>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent));
27private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.McpServerToolCallContent> Create_McpServerToolCallContent(global::System.Text.Json.JsonSerializerOptions options)
29if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.McpServerToolCallContent>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.McpServerToolCallContent> jsonTypeInfo))
31var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.McpServerToolCallContent>
37ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(string), typeof(string), typeof(string)}, modifiers: null),
41jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.Extensions.AI.McpServerToolCallContent>(options, objectInfo);
58DeclaringType = typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent),
60Getter = static obj => ((global::Microsoft.Extensions.AI.McpServerToolCallContent)obj).Name,
68AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent).GetProperty("Name", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
79DeclaringType = typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent),
81Getter = static obj => ((global::Microsoft.Extensions.AI.McpServerToolCallContent)obj).ServerName,
89AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent).GetProperty("ServerName", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
99DeclaringType = typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent),
101Getter = static obj => ((global::Microsoft.Extensions.AI.McpServerToolCallContent)obj).Arguments,
102Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.McpServerToolCallContent)obj).Arguments = value!,
109AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent).GetProperty("Arguments", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IDictionary<string, object>), global::System.Array.Empty<global::System.Type>(), null),
Microsoft.Extensions.AI.OpenAI (7)
Microsoft.Extensions.AI.OpenAI.Tests (33)
Microsoft.Extensions.AI.Stabilization.Tests (21)
Generated\361d1da7f942c932\AIContentSerializationRegressionContext.McpServerToolCallContent.g.cs (20)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.McpServerToolCallContent>? _McpServerToolCallContent;
19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.McpServerToolCallContent> McpServerToolCallContent
22get => _McpServerToolCallContent ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.McpServerToolCallContent>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent));
25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.McpServerToolCallContent> Create_McpServerToolCallContent(global::System.Text.Json.JsonSerializerOptions options)
27if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.McpServerToolCallContent>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.McpServerToolCallContent> jsonTypeInfo))
29var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.McpServerToolCallContent>
35ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(string), typeof(string), typeof(string)}, modifiers: null),
39jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.Extensions.AI.McpServerToolCallContent>(options, objectInfo);
56DeclaringType = typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent),
58Getter = static obj => ((global::Microsoft.Extensions.AI.McpServerToolCallContent)obj).Name,
66AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent).GetProperty("Name", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
77DeclaringType = typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent),
79Getter = static obj => ((global::Microsoft.Extensions.AI.McpServerToolCallContent)obj).ServerName,
87AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent).GetProperty("ServerName", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
97DeclaringType = typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent),
99Getter = static obj => ((global::Microsoft.Extensions.AI.McpServerToolCallContent)obj).Arguments,
100Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.McpServerToolCallContent)obj).Arguments = value!,
107AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent).GetProperty("Arguments", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IDictionary<string, object>), global::System.Array.Empty<global::System.Type>(), null),
Microsoft.Extensions.AI.Tests (25)
Generated\361d1da7f942c932\TestJsonSerializerContext.McpServerToolCallContent.g.cs (20)
13private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.McpServerToolCallContent>? _McpServerToolCallContent;
19public global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.McpServerToolCallContent> McpServerToolCallContent
22get => _McpServerToolCallContent ??= (global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.McpServerToolCallContent>)Options.GetTypeInfo(typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent));
25private global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.McpServerToolCallContent> Create_McpServerToolCallContent(global::System.Text.Json.JsonSerializerOptions options)
27if (!TryGetTypeInfoForRuntimeCustomConverter<global::Microsoft.Extensions.AI.McpServerToolCallContent>(options, out global::System.Text.Json.Serialization.Metadata.JsonTypeInfo<global::Microsoft.Extensions.AI.McpServerToolCallContent> jsonTypeInfo))
29var objectInfo = new global::System.Text.Json.Serialization.Metadata.JsonObjectInfoValues<global::Microsoft.Extensions.AI.McpServerToolCallContent>
35ConstructorAttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent).GetConstructor(InstanceMemberBindingFlags, binder: null, new[] {typeof(string), typeof(string), typeof(string)}, modifiers: null),
39jsonTypeInfo = global::System.Text.Json.Serialization.Metadata.JsonMetadataServices.CreateObjectInfo<global::Microsoft.Extensions.AI.McpServerToolCallContent>(options, objectInfo);
56DeclaringType = typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent),
58Getter = static obj => ((global::Microsoft.Extensions.AI.McpServerToolCallContent)obj).Name,
66AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent).GetProperty("Name", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
77DeclaringType = typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent),
79Getter = static obj => ((global::Microsoft.Extensions.AI.McpServerToolCallContent)obj).ServerName,
87AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent).GetProperty("ServerName", InstanceMemberBindingFlags, null, typeof(string), global::System.Array.Empty<global::System.Type>(), null),
97DeclaringType = typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent),
99Getter = static obj => ((global::Microsoft.Extensions.AI.McpServerToolCallContent)obj).Arguments,
100Setter = static (obj, value) => ((global::Microsoft.Extensions.AI.McpServerToolCallContent)obj).Arguments = value!,
107AttributeProviderFactory = static () => typeof(global::Microsoft.Extensions.AI.McpServerToolCallContent).GetProperty("Arguments", InstanceMemberBindingFlags, null, typeof(global::System.Collections.Generic.IDictionary<string, object>), global::System.Array.Empty<global::System.Type>(), null),