Disable STJ reflection for testing. (#266)
* Disable STJ reflection for testing. * Remove params method and redundant overload. --------- Co-authored-by: Stephen Toub <stoub@microsoft.com>
This commit is contained in:
parent
45dcfe07ca
commit
e3aa54eb3c
1 changed files with 155 additions and 75 deletions
|
|
@ -1,4 +1,6 @@
|
|||
using ModelContextProtocol.Utils.Json;
|
||||
using System.ComponentModel;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace ModelContextProtocol.Server;
|
||||
|
||||
|
|
@ -122,11 +124,19 @@ public sealed class McpServerToolCreateOptions
|
|||
/// </remarks>
|
||||
public bool? ReadOnly { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the JSON serializer options to use when marshalling data to/from JSON.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Defaults to <see cref="McpJsonUtilities.DefaultOptions"/> if left unspecified.
|
||||
/// </remarks>
|
||||
public JsonSerializerOptions? SerializerOptions { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Creates a shallow clone of the current <see cref="McpServerToolCreateOptions"/> instance.
|
||||
/// </summary>
|
||||
internal McpServerToolCreateOptions Clone() =>
|
||||
new McpServerToolCreateOptions()
|
||||
new McpServerToolCreateOptions
|
||||
{
|
||||
Services = Services,
|
||||
Name = Name,
|
||||
|
|
@ -135,6 +145,7 @@ public sealed class McpServerToolCreateOptions
|
|||
Destructive = Destructive,
|
||||
Idempotent = Idempotent,
|
||||
OpenWorld = OpenWorld,
|
||||
ReadOnly = ReadOnly
|
||||
ReadOnly = ReadOnly,
|
||||
SerializerOptions = SerializerOptions,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue