Clean up types (#6)
This commit is contained in:
parent
c9ace236a0
commit
211cd2175b
1 changed files with 154 additions and 307 deletions
|
|
@ -1,13 +1,8 @@
|
|||
// Protocol/Transport/IMcpTransport.cs
|
||||
using System.Threading.Channels;
|
||||
using McpDotNet.Protocol.Messages;
|
||||
|
||||
namespace McpDotNet.Protocol.Transport;
|
||||
|
||||
using System.Text.Json;
|
||||
using System.Threading.Channels;
|
||||
using global::McpDotNet.Protocol.Messages;
|
||||
using McpDotNet.Utils.Json;
|
||||
|
||||
// Protocol/Transport/TransportBase.cs
|
||||
|
||||
/// <summary>
|
||||
/// Base class for implementing MCP transports with common functionality.
|
||||
/// </summary>
|
||||
|
|
@ -15,8 +10,10 @@ public abstract class TransportBase : IMcpTransport
|
|||
{
|
||||
private readonly Channel<IJsonRpcMessage> _messageChannel;
|
||||
private bool _isConnected;
|
||||
private readonly JsonSerializerOptions _jsonOptions = new JsonSerializerOptions().ConfigureForMcp();
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="TransportBase"/> class.
|
||||
/// </summary>
|
||||
protected TransportBase()
|
||||
{
|
||||
// Unbounded channel to prevent blocking on writes
|
||||
|
|
|
|||
Loading…
Reference in a new issue