Add explicit [Experimental] protected constructors to McpClient and McpServer (#1363)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
Co-authored-by: jeffhandley <1031940+jeffhandley@users.noreply.github.com>
Co-authored-by: Jeff Handley <jeffhandley@users.noreply.github.com>
This commit is contained in:
Copilot 2026-02-23 21:37:39 -05:00 • committed by GitHub
commit 124b43b5c1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -943,7 +943,9 @@ public class McpServerTests : LoggedTest
await tcs.Task.WaitAsync(TestConstants.DefaultTimeout, cancellationToken);
}
#pragma warning disable MCPEXP002
private sealed class TestServerForIChatClient(bool supportsSampling) : McpServer
#pragma warning restore MCPEXP002
{
public override ClientCapabilities? ClientCapabilities =>
supportsSampling ? new ClientCapabilities { Sampling = new SamplingCapability() } :