* Remove `McpEndpoint` & `IMcpClient` * Revise naming, add abstract classes * Fix missing renames * Move extension methods to instance methods * Add back old API, but obsoleted * Add back obsoleted factory classes * Move deprecation attributes * `SseClientTransport` -> `HttpClientTransport` * Update src/ModelContextProtocol.Core/Server/AugmentedServiceProvider.cs Co-authored-by: Stephen Halter <halter73@gmail.com> * PR feedback * PR feedback * Add back dispose lock * Fix docs projects * PR feedback * Undo `docs/*.md` changes --------- Co-authored-by: Stephen Halter <halter73@gmail.com>
16 lines
582 B
C#
16 lines
582 B
C#
using ModelContextProtocol.Protocol;
|
|
|
|
namespace ModelContextProtocol;
|
|
|
|
/// <summary>
|
|
/// Provides an <see cref="IProgress{ProgressNotificationValue}"/> tied to a specific progress token and that will issue
|
|
/// progress notifications on the supplied session.
|
|
/// </summary>
|
|
internal sealed class TokenProgress(McpSession session, ProgressToken progressToken) : IProgress<ProgressNotificationValue>
|
|
{
|
|
/// <inheritdoc />
|
|
public void Report(ProgressNotificationValue value)
|
|
{
|
|
_ = session.NotifyProgressAsync(progressToken, value, CancellationToken.None);
|
|
}
|
|
}
|