public static NetProxy Create(string remoteAddress) { NetProxy session = null; var address = (remoteAddress ?? "").Split(':'); if (address.Length > 1 && !address[0].StartsWith("http", StringComparison.CurrentCultureIgnoreCase)) { session = new SocketNetProxy(address[0], Convert.ToInt32(address[1])); } else { session = new HttpNetProxy(remoteAddress); } return session; }
public static NetProxy Create(string remoteAddress) { NetProxy session = null; var address = (remoteAddress ?? "").Split(':'); if (address.Length > 1 && !address[0].StartsWith("http", StringComparison.CurrentCultureIgnoreCase)) { session = new SocketNetProxy(address[0], Convert.ToInt32(address[1])); } else { session = new HttpNetProxy(remoteAddress); } return(session); }