Add 3-arg RequestContext constructor and obsolete 2-arg to eliminate null-forgiving operator usage (#1462)

This commit is contained in:
Copilot 2026-03-27 12:33:23 -07:00 • committed by GitHub
commit 7dcdbafe9d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -280,7 +280,7 @@ public class Program
ReadResourceHandler = async (request, cancellationToken) =>
{
if (request.Params?.Uri is null)
if (request.Params.Uri is null)
{
throw new McpProtocolException("Missing required argument 'uri'", McpErrorCode.InvalidParams);
}