Hide experimental types from external source generators using internal property pattern (#1301)

This commit is contained in:
Mackinnon Buck 2026-02-19 07:27:30 -08:00 • committed by GitHub
commit cc6ef5b926
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -128,8 +128,17 @@ public sealed class Tool : IBaseMetadata
/// regarding task augmentation support. See <see cref="ToolExecution"/> for details.
/// </remarks>
[Experimental(Experimentals.Tasks_DiagnosticId, UrlFormat = Experimentals.Tasks_Url)]
[JsonIgnore]
public ToolExecution? Execution
{
get => ExecutionCore;
set => ExecutionCore = value;
}
// See ExperimentalInternalPropertyTests.cs before modifying this property.
[JsonInclude]
[JsonPropertyName("execution")]
public ToolExecution? Execution { get; set; }
internal ToolExecution? ExecutionCore { get; set; }
/// <summary>
/// Gets or sets an optional list of icons for this tool.