forked from modelcontextprotocol/csharp-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNopProgress.cs
More file actions
19 lines (17 loc) · 722 Bytes
/
NopProgress.cs
File metadata and controls
19 lines (17 loc) · 722 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
namespace ModelContextProtocol;
/// <summary>Provides an <see cref="IProgress{ProgressNotificationValue}"/> that's a nop.</summary>
internal sealed class NullProgress : IProgress<ProgressNotificationValue>
{
/// <summary>
/// Gets the singleton instance of the <see cref="NullProgress"/> class that performs no operations when progress is reported.
/// </summary>
/// <remarks>
/// Use this property when you need to provide an <see cref="IProgress{T}"/> implementation
/// but don't need to track or report actual progress.
/// </remarks>
public static NullProgress Instance { get; } = new();
/// <inheritdoc />
public void Report(ProgressNotificationValue value)
{
}
}