public static string UrlListToString(IDictionary<string, string> urlList)
{
if (urlList == null)
throw new ApplicationException("Please give at least one site url.");
var sb = new StringBuilder();
foreach (string key in urlList.Keys)
{
string auth = urlList[key];
sb.Append("<Url");
if(!String.IsNullOrEmpty(auth))
sb.Append(" authType='").Append(auth).Append("'");
sb.Append(">");
sb.Append(key);
sb.Append("</Url>");
}
return sb.ToString();
}