private Uri GetUri(string relativePath) {
Uri uri;
try {
uri = (_baseUri != null) ? new Uri(_baseUri, relativePath) : new Uri(relativePath);
// if (m_RequestParameters != null)
// {
// StringBuilder sb = new StringBuilder();
// string s = string.Empty;
//
// foreach (DictionaryEntry de in m_RequestParameters)
// {
// sb.Append(s + de.Key + "=" + de.Value);
//
// if( s.Length == 0)
// s = "&";
// }
// UriBuilder ub = new UriBuilder(uri);
// ub.Query = sb.ToString();
// uri = ub.Uri;
// }
}
catch(UriFormatException ex) {
if(log.IsWarnEnabled)
log.Warn(ex);
uri = new Uri(Path.GetFullPath(relativePath));
}
if(IsDebugEnabled)
log.Debug("Get uri from relativePath=[{0}]. uri.AbsolutePath=[{1}]", relativePath, uri.AbsolutePath);
return uri;
}