public IDnsClient Build()
        {
            var requestBuilder = new RequestBuilder(_logger);

            var recordTextParser = new RecordTextParser();
            var recordParser = new RecordNameParser(new NullLogger());
            
            var parserFactory = new ParserFactory(
                new AParser(),
                new AaaaParser(),
                new MxParser(recordParser),
                new RpParser(recordParser),
                new MrParser(),
                new MbParser(),
                new MgParser(),
                new NsParser(),
                new CNameParser(recordParser),
                new PtrParser(),
                new HInfoParser(recordTextParser),
                new MInfoParser(recordParser),
                new X25Parser(recordTextParser),
                new TxtParser(recordTextParser),
                new LocParser(),
                new SoaParser(recordParser),
                new SrvParser(recordParser),
                new AfsdbParser(recordParser),
                new AtmaParser(),
                new IsdnParser(recordTextParser),
                new RtParser(recordParser),
                new UnknownParser(),
                new WksParser());

            var resolverFactory = new ResolverFactory(
                new TcpResolver(_timeout),
                new UdpResolver(_timeout));

            var responseParser = new ResponseParser(
                new RecordNameParser(_logger),
                parserFactory);

            return new DnsClient(
                _serverEndPoint,
                requestBuilder,
                resolverFactory,
                responseParser);
        }
 public X25Parser(RecordTextParser parser)
 {
     _parser = parser;
 }
Example #3
0
 public HInfoParser(RecordTextParser recordNameParser)
 {
     _recordNameParser = recordNameParser;
 }
Example #4
0
 public IsdnParser(RecordTextParser parser)
 {
     _parser = parser;
 }
 public IsdnParser(RecordTextParser parser)
 {
     _parser = parser;
 }
 public HInfoParser(RecordTextParser recordNameParser)
 {
     _recordNameParser = recordNameParser;
 }
 public TxtParser(RecordTextParser parser)
 {
     _parser = parser;
 }