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:
parent
5385c0de67
commit
136755f2be
1 changed files with 663 additions and 2674 deletions
|
|
@ -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 :
|
||||
|
|
|
|||
Loading…
Reference in a new issue