/// <summary> /// Updates the given hostnames via DNS-O-Matic with the public facing /// IP Address for the system that the request is made from. /// </summary> /// <param name="hostnames">A comma delimited list of hostnames to update.</param> /// <returns>True, if all of the hostnames updated correctly, otherwise false.</returns> public bool UpdateHostnames(string hostnames) { 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(UpdateHostnames(hostnames, ip)); }
/// <summary> /// Updates the specified hostnames via DNS-O-Matic with the public facing /// IP Address for the system that the request is made from. /// </summary> /// <param name="hostnames">The hostnames to update.</param> /// <returns> /// True if all updates were successful, otherwise false. /// Check UpdateStatusCodes dictionary for individual hostname status. /// </returns> public bool UpdateHostnames(List<string> hostnames) { 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 UpdateHostnames(hostnames, ip); }