コード例 #1
0
ファイル: UriExtension.cs プロジェクト: nharper285/onefuzz
        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));
        }
コード例 #2
0
 public string GetComponents(UriComponents components, UriFormat format) => Inner.GetComponents((System.UriComponents)components, (System.UriFormat)format);