DnsResolverExtensionsResolveHostAsync(IDnsResolver, String, CancellationToken) Method
Queries a dns resolver for IP addresses of a host as an asynchronous operation.
Namespace: ARSoft.Tools.Net.DnsAssembly: ARSoft.Tools.Net (in ARSoft.Tools.Net.dll) Version: 3.6.1+aaafdcd61f068318c11734f7b3c59c69371c0549
public static Task<List<IPAddress>> ResolveHostAsync(
this IDnsResolver resolver,
string name,
CancellationToken token = default
)
<ExtensionAttribute>
Public Shared Function ResolveHostAsync (
resolver As IDnsResolver,
name As String,
Optional token As CancellationToken = Nothing
) As Task(Of List(Of IPAddress))
public:
[ExtensionAttribute]
static Task<List<IPAddress^>^>^ ResolveHostAsync(
IDnsResolver^ resolver,
String^ name,
CancellationToken token = CancellationToken()
)
[<ExtensionAttribute>]
static member ResolveHostAsync :
resolver : IDnsResolver *
name : string *
?token : CancellationToken
(* Defaults:
let _token = defaultArg token new CancellationToken()
*)
-> Task<List<IPAddress>>
- resolver IDnsResolver
- The resolver instance, that should be used for queries
- name String
- Host name, that should be queried
- token CancellationToken (Optional)
- The token to monitor cancellation requests
TaskListIPAddress A list of matching host addresses In Visual Basic and C#, you can call this method as an instance method on any object of type
IDnsResolver. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).