DGI.ResolveHostnameDriver 1.1.0
ResolverHostNameDriver
Driver that resolves the IPv4 of a device by its hostname. It will try to resolve using device's DNS resolver
Usage
Create an instance of the driver and subscribe to the StatusChanged event. The event will be triggered when the driver changes its status. The driver will try to resolve the hostname using the device's DNS resolver. The driver will return the first address that it can resolve.
var resolver = new ResolveHostnameDriver();
resolver.StatusChanged += (_, args) =>
{
Log.Verbose("Status Changed: {@Args}", args);
};
var address = await resolver.ResolveHostname("CP4-Home");
Serilog
The class accepts a SerilogLogger as a property. This is optional
var logger = new LoggerConfiguration()
.WriteTo.Console()
.CreateLogger();
var resolver.ClassLogger = logger;
Notes
mDNS/ZeroConfig hostname resolution was removed from the previous version.
Compiling the zeroConfig libraries in SIMPL takes a really long time.
If resolution using either mDNS or DNS is needed use version 1.0.0. or use the separate driver ResolveMDnsHostnameDriver
Showing the top 20 packages that depend on DGI.ResolveHostnameDriver.