Add ModelContextProtocol.Core package (#428)

This commit is contained in:
Stephen Halter 2025-06-02 15:16:45 -07:00 • committed by GitHub
commit 703b0fe50b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,16 +0,0 @@
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 endpoint.
/// </summary>
internal sealed class TokenProgress(IMcpEndpoint endpoint, ProgressToken progressToken) : IProgress<ProgressNotificationValue>
{
/// <inheritdoc />
public void Report(ProgressNotificationValue value)
{
_ = endpoint.NotifyProgressAsync(progressToken, value, CancellationToken.None);
}
}