public QueryEndpoint(Configuration.IProvider configurationProvider) { _settings = configurationProvider.GetSettings(); _instructionNumber = new InstructionNumber(); _ipAddress = string.IsNullOrWhiteSpace(_settings.LocalIpAddress) ? Dns.GetHostEntry(Dns.GetHostName()).AddressList.FirstOrDefault(ip => ip.AddressFamily == AddressFamily.InterNetwork) : IPAddress.Parse(_settings.LocalIpAddress); }