private string GetUserData() { if (userDataUrl.Contains(DhcpServerPlaceholder)) { List <IPAddress> dhcpServers = NetworkUtilities.GetDhcpServers(); foreach (IPAddress address in dhcpServers) { string userData = NetworkUtilities.HttpGet(userDataUrl.Replace(DhcpServerPlaceholder, address.ToString())); if (userData != null) { return(userData); } } return(null); } else { return(NetworkUtilities.HttpGet(userDataUrl)); } }