Bespoke.DynamicDnsUpdater.Client.DynamicDnsClientBase.UpdateHostname C# (CSharp) Method

UpdateHostname() public method

Updates the specified hostname via DNS-O-Matic with the public facing IP Address for the system that the request is made from.
public UpdateHostname ( string hostname ) : bool
hostname string The hostname to update.
return bool
        public bool UpdateHostname(string hostname)
        {
            var resolver = new IpAddressResolver();

            var ip = resolver.GetPublicIpAddress();

            if (ip == null) return false;

            logger.Info(string.Format("Resolved public IP Address as {0}", ip));

            return UpdateHostname(hostname, ip);
        }

Same methods

DynamicDnsClientBase::UpdateHostname ( string hostname, string ipAddress ) : bool