Hide experimental types from external source generators using internal property pattern (#1301)
This commit is contained in:
parent
231e013160
commit
cc6ef5b926
1 changed files with 315 additions and 7 deletions
|
|
@ -1,3 +1,4 @@
|
|||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
|
|
@ -33,6 +34,16 @@ public sealed class CallToolRequestParams : RequestParams
|
|||
/// When present, indicates that the requestor wants this operation executed as a task.
|
||||
/// The receiver must support task augmentation for this specific request type.
|
||||
/// </remarks>
|
||||
[Experimental(Experimentals.Tasks_DiagnosticId, UrlFormat = Experimentals.Tasks_Url)]
|
||||
[JsonIgnore]
|
||||
public McpTaskMetadata? Task
|
||||
{
|
||||
get => TaskCore;
|
||||
set => TaskCore = value;
|
||||
}
|
||||
|
||||
// See ExperimentalInternalPropertyTests.cs before modifying this property.
|
||||
[JsonInclude]
|
||||
[JsonPropertyName("task")]
|
||||
public McpTaskMetadata? Task { get; set; }
|
||||
internal McpTaskMetadata? TaskCore { get; set; }
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue