Allow JsonSerializerOptions parameters for user-defined and inputs and hardcode everything else to the source generator. (#182)
* Allow user-defined JsonSerializerOptions for user-defined and inputs and hardcode everything else to the source generator. * Add validation for user-defined JsonSerializerOptions. * Remove out of date comment. * Address feedback and add tests
This commit is contained in:
parent
4b38d3e71b
commit
f1af251c32
1 changed files with 632 additions and 372 deletions
|
|
@ -5,12 +5,11 @@ namespace ModelContextProtocol;
|
|||
/// <summary>Represents a client or server MCP endpoint.</summary>
|
||||
public interface IMcpEndpoint : IAsyncDisposable
|
||||
{
|
||||
/// <summary>Sends a generic JSON-RPC request to the connected endpoint.</summary>
|
||||
/// <typeparam name="TResult">The expected response type.</typeparam>
|
||||
/// <summary>Sends a JSON-RPC request to the connected endpoint.</summary>
|
||||
/// <param name="request">The JSON-RPC request to send.</param>
|
||||
/// <param name="cancellationToken">A token to cancel the operation.</param>
|
||||
/// <returns>A task containing the client's response.</returns>
|
||||
Task<TResult> SendRequestAsync<TResult>(JsonRpcRequest request, CancellationToken cancellationToken = default) where TResult : class;
|
||||
Task<JsonRpcResponse> SendRequestAsync(JsonRpcRequest request, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>Sends a message to the connected endpoint.</summary>
|
||||
/// <param name="message">The message.</param>
|
||||
|
|
|
|||
Loading…
Reference in a new issue