AW.Pay.Core.AliPay.CreateURLParamString C# (CSharp) Method

CreateURLParamString() private method

private CreateURLParamString ( string>.SortedDictionary dicArray, EnumAliPayTradeType type = EnumAliPayTradeType.Website ) : string
dicArray string>.SortedDictionary
type EnumAliPayTradeType
return string
        private string CreateURLParamString(SortedDictionary<string, string> dicArray, EnumAliPayTradeType type = EnumAliPayTradeType.Website)
        {
            StringBuilder prestr = new StringBuilder();
            foreach (KeyValuePair<string, string> temp in dicArray.OrderBy(o => o.Key))
            {
                if (type == EnumAliPayTradeType.APP)
                    prestr.Append(temp.Key + "=\"" + temp.Value + "\"&");
                else
                    prestr.Append(temp.Key + "=" + temp.Value + "&");
            }

            int nLen = prestr.Length;
            prestr.Remove(nLen - 1, 1);
            return prestr.ToString();
        }