Clean up types (#6)

This commit is contained in:
Peder Holdgaard Pedersen 2025-01-05 13:19:24 +01:00 • committed by GitHub
commit 211cd2175b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,7 +2,6 @@
namespace McpDotNet.Protocol.Transport;
using System.Diagnostics;
using System.Text;
using System.Text.Json;
using System.Threading;
using McpDotNet.Protocol.Messages;
@ -13,14 +12,29 @@ using McpDotNet.Utils.Json;
/// </summary>
public record StdioTransportOptions
{
/// <summary>
/// The command to execute to start the server process.
/// </summary>
public required string Command { get; set; }
/// <summary>
/// Arguments to pass to the server process.
/// </summary>
public string[]? Arguments { get; set; } = Array.Empty<string>();
/// <summary>
/// The working directory for the server process.
/// </summary>
public string? WorkingDirectory { get; set; }
/// <summary>
/// Environment variables to set for the server process.
/// </summary>
public Dictionary<string, string>? EnvironmentVariables { get; set; }
/// <summary>
/// The timeout to wait for the server to shut down gracefully.
/// </summary>
public TimeSpan ShutdownTimeout { get; init; } = TimeSpan.FromSeconds(5);
}