Closed dchauran closed 2 years ago
That's by design and those properties are immutable for good reason.
Your use case is a different one, you want to call multiple different servers? Then just use the .QueryServer
overloads which have options to specify a different server (and options) each call.
I am trying to use the DnsClient to validate DNS entries agianst different sets of name servers or the client's default name servers.
In all of these cases, the LookupClientOptions are the same, but the servers are not. I have a common function to create the client with the correct options, but since the name servers in the LookupClientOptions are read-only, this requires a rather ugly workaround:
as opposed to a more elegant: