예제 #1
0
        public static string CreateQueryUri(string xml, string xdt)
        {
            var encoded    = Encode(xml, xdt);
            var compressed = DeflateUrlCompression.Compress(encoded);

            return(QueryHelpers.AddQueryString("", QUERY, compressed));
        }
예제 #2
0
        public static bool TryParseQuery(string rawCompressedQuery, out string xml, out string xdt)
        {
            xml = "";
            xdt = "";

            try
            {
                var decompressed = DeflateUrlCompression.Decompress(rawCompressedQuery);
                (xml, xdt) = Decode(decompressed);
                return(true);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message + "\n" + ex.StackTrace);
                return(false);
            }
        }