Example #1
0
 public static bool TryParse(string text, out Host host)
 {
     string[] t = text.Split(':');
     if ((t.Length == 2) && IP.TryParse(t[0], out IP ip) && int.TryParse(t[1], out int port))
     {
         host = new Host(ip, port);
         return(true);
     }
     else
     {
         host = Host.None(0);
         return(false);
     }
 }
Example #2
0
 public static bool TryParse(JIP j, out IP sid) => IP.TryParse(j, out sid);