mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
25 lines
584 B
C#
25 lines
584 B
C#
using System;
|
|
using mRemoteNG.Connection.Protocol;
|
|
|
|
namespace mRemoteNG.Connection
|
|
{
|
|
public static class Converter
|
|
{
|
|
public static string ProtocolToString(ProtocolType protocol)
|
|
{
|
|
return protocol.ToString();
|
|
}
|
|
|
|
public static ProtocolType StringToProtocol(string protocol)
|
|
{
|
|
try
|
|
{
|
|
return (ProtocolType)Enum.Parse(typeof(ProtocolType), protocol, true);
|
|
}
|
|
catch (Exception)
|
|
{
|
|
return ProtocolType.RDP;
|
|
}
|
|
}
|
|
}
|
|
} |