Clean up namespaces (#410)
No meaningful code changes, just lots of namespace shuffling to have fewer namespaces and to put things in better namespaces.
This commit is contained in:
parent
c11c634945
commit
106ab8064f
1 changed files with 491 additions and 668 deletions
30
src/ModelContextProtocol/Protocol/CancelledNotification.cs
Normal file
30
src/ModelContextProtocol/Protocol/CancelledNotification.cs
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace ModelContextProtocol.Protocol;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a notification indicating that a request has been cancelled by the client,
|
||||
/// and that any associated processing should cease immediately.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This class is typically used in conjunction with the <see cref="NotificationMethods.CancelledNotification"/>
|
||||
/// method identifier. When a client sends this notification, the server should attempt to
|
||||
/// cancel any ongoing operations associated with the specified request ID.
|
||||
/// </remarks>
|
||||
public sealed class CancelledNotification
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the ID of the request to cancel.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This must match the ID of an in-flight request that the sender wishes to cancel.
|
||||
/// </remarks>
|
||||
[JsonPropertyName("requestId")]
|
||||
public RequestId RequestId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets an optional string describing the reason for the cancellation request.
|
||||
/// </summary>
|
||||
[JsonPropertyName("reason")]
|
||||
public string? Reason { get; set; }
|
||||
}
|
||||
Loading…
Reference in a new issue