From ac32e4be09e7dd98ad36705e3e28f4eaf25e1311 Mon Sep 17 00:00:00 2001 From: ig Date: Thu, 4 May 2023 09:43:42 +0200 Subject: [PATCH] improve SshHost usability --- csharp/Lib/Utils/SshHost.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/csharp/Lib/Utils/SshHost.cs b/csharp/Lib/Utils/SshHost.cs index c8bb24023..f7fe6be1b 100644 --- a/csharp/Lib/Utils/SshHost.cs +++ b/csharp/Lib/Utils/SshHost.cs @@ -26,4 +26,8 @@ public class SshHost } public Task Ping() => HostName.Ping(); + + public static implicit operator SshHost(String hostname) => new SshHost(hostname); + + public override String ToString() => Command.ToString(); } \ No newline at end of file