Switch to primary constructor
This commit is contained in:
@@ -7,18 +7,13 @@ using ModelContextProtocol.Server;
|
||||
namespace McpSsh.Server.Tools;
|
||||
|
||||
[McpServerToolType]
|
||||
public sealed class SshTools
|
||||
public sealed class SshTools(SshExecService sshExecService,
|
||||
TerminalSessionManager terminalSessionManager,
|
||||
SftpService sftpService)
|
||||
{
|
||||
private readonly SshExecService _sshExecService;
|
||||
private readonly TerminalSessionManager _terminalSessionManager;
|
||||
private readonly SftpService _sftpService;
|
||||
|
||||
public SshTools(SshExecService sshExecService, TerminalSessionManager terminalSessionManager, SftpService sftpService)
|
||||
{
|
||||
_sshExecService = sshExecService;
|
||||
_terminalSessionManager = terminalSessionManager;
|
||||
_sftpService = sftpService;
|
||||
}
|
||||
private readonly SshExecService _sshExecService = sshExecService;
|
||||
private readonly TerminalSessionManager _terminalSessionManager = terminalSessionManager;
|
||||
private readonly SftpService _sftpService = sftpService;
|
||||
|
||||
[McpServerTool(Name = "ssh_exec", Destructive = false)]
|
||||
[Description("Execute a single command over SSH using key-based authentication.")]
|
||||
|
||||
Reference in New Issue
Block a user