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,4 +1,5 @@
|
|||
using System.ComponentModel;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text.Json.Serialization;
|
||||
using ModelContextProtocol.Server;
|
||||
|
||||
|
|
@ -79,6 +80,16 @@ public sealed class ServerCapabilities
|
|||
/// See <see cref="McpTasksCapability"/> for details on configuring which operations support tasks.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
[Experimental(Experimentals.Tasks_DiagnosticId, UrlFormat = Experimentals.Tasks_Url)]
|
||||
[JsonIgnore]
|
||||
public McpTasksCapability? Tasks
|
||||
{
|
||||
get => TasksCore;
|
||||
set => TasksCore = value;
|
||||
}
|
||||
|
||||
// See ExperimentalInternalPropertyTests.cs before modifying this property.
|
||||
[JsonInclude]
|
||||
[JsonPropertyName("tasks")]
|
||||
public McpTasksCapability? Tasks { get; set; }
|
||||
internal McpTasksCapability? TasksCore { get; set; }
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue