public static IDictionary <string, string> GetQueryComponents(System.Uri uri) { var queryComponents = uri.GetComponents(UriComponents.Query, UriFormat.UriEscaped).Split("&"); var q = from cs in queryComponents where !string.IsNullOrEmpty(cs) let i = cs.IndexOf('=') select new KeyValuePair <string, string>(Uri.UnescapeDataString(cs.Substring(0, i)), Uri.UnescapeDataString(cs.Substring(i + 1))); return(new Dictionary <string, string>(q)); }
public string GetComponents(UriComponents components, UriFormat format) => Inner.GetComponents((System.UriComponents)components, (System.UriFormat)format);