Remove obsolete APIs from codebase and standardize MCP diagnostic IDs (#985)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: MackinnonBuck <10456961+MackinnonBuck@users.noreply.github.com>
Co-authored-by: eiriktsarpalis <2813363+eiriktsarpalis@users.noreply.github.com>
Co-authored-by: Mackinnon Buck <mackinnon.buck@gmail.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 2025-12-02 10:28:46 -08:00 • committed by GitHub
commit 136755f2be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -19,18 +19,13 @@ internal sealed class RequestServiceProvider<TRequestParams>(RequestContext<TReq
public static bool IsAugmentedWith(Type serviceType) =>
serviceType == typeof(RequestContext<TRequestParams>) ||
serviceType == typeof(McpServer) ||
#pragma warning disable CS0618 // Type or member is obsolete
serviceType == typeof(IMcpServer) ||
#pragma warning restore CS0618 // Type or member is obsolete
serviceType == typeof(IProgress<ProgressNotificationValue>) ||
serviceType == typeof(ClaimsPrincipal);
/// <inheritdoc />
public object? GetService(Type serviceType) =>
serviceType == typeof(RequestContext<TRequestParams>) ? request :
#pragma warning disable CS0618 // Type or member is obsolete
serviceType == typeof(McpServer) || serviceType == typeof(IMcpServer) ? request.Server :
#pragma warning restore CS0618 // Type or member is obsolete
serviceType == typeof(McpServer) ? request.Server :
serviceType == typeof(IProgress<ProgressNotificationValue>) ?
(request.Params?.ProgressToken is { } progressToken ? new TokenProgress(request.Server, progressToken) : NullProgress.Instance) :
serviceType == typeof(ClaimsPrincipal) ? request.User :