public static Uri EncodeQueryString(this Uri uri, IEnumerable <KeyValuePair <string, string> > queries) { return(new Uri(uri.GetLeftPart(UriPartial.Path) + WebAPI.EncodeQuery(queries))); }