public void BadServerPort() { Assert.Throws <ArgumentOutOfRangeException>(delegate { _whois.Query("example.com", BadPortServer); }); }
private static int RunWhois(Options o) { var whois = new YaWhoisClient(); whois.WhenResponseParsed += Whois_ResponseParsed; if (o.UseIANA) { o.Server = "whois.iana.org"; } try { whois.Query(o.Object, o.Server, o.Verbose); return(0); } catch (Exception e) { Console.WriteLine(e.Message); return(2); } }