Class DnsLookup
The DnsLookup class is a concrete implementation of the TestComponent class that is used to perform a DNS lookup. It uses the mechanisms provided by the operating system to perform DNS lookups.
public sealed class DnsLookup : TestComponent, ITestComponent
- Inheritance
-
DnsLookup
- Implements
- Inherited Members
Remarks
note
This component operates without any dependency on other components. Please also note, the DNS lookup method may use cached data from the local machine if the DNS information for the host has been cached previously.
Constructors
DnsLookup()
Initializes a new instance of the DnsLookup class.
public DnsLookup()
Fields
ComponentName
The name of the test component that represents a DnsLookup test operation.
public const string ComponentName = "DNS lookup"
Field Value
Remarks
This constant is used to register the DnsLookup class in the test framework.
Methods
HandleAsync(Uri, TestSettings, TestContext, IServiceProvider, CancellationToken)
This method performs the test step operation asynchronously.
public override Task HandleAsync(Uri url, TestSettings settings, TestContext context, IServiceProvider serviceProvider, CancellationToken cancellationToken = default)
Parameters
url
UriA Uri object that represents the URL of the page being validated.
settings
TestSettingsA TestSettings object that contains the settings for the test.
context
TestContextA TestContext object that represents the test context.
serviceProvider
IServiceProviderAn instance object of a mechanism for retrieving a service object.
cancellationToken
CancellationTokenAn optional CancellationToken object that can be used to cancel the this operation.