Skip to content

Commit

Permalink
Merge pull request #13 from alanedwardes/adds-missing-sample-usings
Browse files Browse the repository at this point in the history
Adds missing using statements.
  • Loading branch information
alanedwardes authored Mar 26, 2023
2 parents bc73f9f + f923e0d commit 1e15049
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion samples/RacerClient/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using IDnsClient google2 = new DnsUdpClient(IPAddress.Parse("8.8.4.4"));

// Construct the race: you must pass at least two clients
IDnsClient dnsClient = new DnsRacerClient(cloudFlare1, cloudFlare2, google1, google2);
using IDnsClient dnsClient = new DnsRacerClient(cloudFlare1, cloudFlare2, google1, google2);

// Race two clients in parallel, use the fatest result, discard the slowest
DnsMessage answer = await dnsClient.Query(DnsQueryFactory.CreateQuery("google.com"));
Expand Down
2 changes: 1 addition & 1 deletion samples/RoundRobinClient/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using IDnsClient google1 = new DnsUdpClient(IPAddress.Parse("8.8.8.8"));
using IDnsClient google2 = new DnsUdpClient(IPAddress.Parse("8.8.4.4"));

IDnsClient dnsClient = new DnsRoundRobinClient(cloudFlare1, cloudFlare2, google1, google2);
using IDnsClient dnsClient = new DnsRoundRobinClient(cloudFlare1, cloudFlare2, google1, google2);

// Run an A query for google.com
DnsMessage answer = await dnsClient.Query(DnsQueryFactory.CreateQuery("google.com"));
Expand Down

0 comments on commit 1e15049

Please sign in to comment.