csharp-sdk/src/ModelContextProtocol/NopProgress.cs
Rob Chambers 77871c5aac
AI seeded comments from robch and then edited by stephentoub (#238)
* AI generated `///` comment updates

* Fix compilation issues

* Fix incorrect XML comment structure

* Update all Client comments

* Update all Configuration comments

* Update all Messages comments

* Update all Transport comments

* Update all Types comments

* Update all Server comments

* Undo some commenting

---------

Co-authored-by: Stephen Toub <stoub@microsoft.com>
2025-04-10 01:30:44 -04:00

19 lines
722 B
C#

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)
{
}
}