Add ModelContextProtocol.Core package (#428)
This commit is contained in:
parent
57458241b9
commit
703b0fe50b
1 changed files with 239 additions and 94 deletions
|
|
@ -1,30 +0,0 @@
|
|||
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