Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WhoisLookup"/> class with the given <see cref="WhoisOptions"/>.
 /// </summary>
 public WhoisLookup(WhoisOptions options)
 {
     Options      = options;
     whoisParser  = new WhoisParser();
     TcpReader    = new TcpReader();
     ServerLookup = new IanaServerLookup(TcpReader);
 }
Esempio n. 2
0
 static WhoisOptions()
 {
     Defaults = new WhoisOptions
     {
         DefaultEncoding         = Encoding.UTF8,
         ParseWhoisResponse      = true,
         ThrowOnParsingException = true
     };
 }
Esempio n. 3
0
 static WhoisOptions()
 {
     Defaults = new WhoisOptions
     {
         Encoding       = Encoding.UTF8,
         FollowReferrer = true,
         TimeoutSeconds = 10
     };
 }
Esempio n. 4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="WhoisLookup"/> class.
        /// </summary>
        public WhoisLookup(WhoisOptions options)
        {
            patternExtractorVisitor = new PatternExtractorVisitor();

            Options = options;

            Visitors = new List <IWhoisVisitor>
            {
                // Validate input
                new ValidateVisitor(),

                // Get initial WHOIS server URL
                new WhoisServerVisitor(),

                // Download from initial server
                new DownloadVisitor(),

                // Check to see if a secondard WHOIS server needs to be queried
                new RedirectVisitor(),

                // Populate Structured WHOIS object
                patternExtractorVisitor
            };
        }