mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 12:56:28 +08:00
删除无用代码
This commit is contained in:
@@ -106,7 +106,6 @@ namespace SDKCSharp.Client
|
||||
form[this.openConfig.AccessTokenName] = accessToken;
|
||||
}
|
||||
form[this.openConfig.AppKeyName] = this.appId;
|
||||
string content = SopSignature.getSignContent(form);
|
||||
string sign = SignUtil.CreateSign(form, privateKey, request.Charset, request.SignType);
|
||||
form[this.openConfig.SignName] = sign;
|
||||
|
||||
|
@@ -1,34 +0,0 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace SDKCSharp.Common
|
||||
{
|
||||
public class SopSignature
|
||||
{
|
||||
public SopSignature()
|
||||
{
|
||||
}
|
||||
|
||||
public static String getSignContent(Dictionary<string, string> form)
|
||||
{
|
||||
StringBuilder content = new StringBuilder();
|
||||
List<string> keys = new List<string>(form.Keys);
|
||||
|
||||
keys.Sort();
|
||||
int index = 0;
|
||||
for (int i = 0; i < keys.Count; i++)
|
||||
{
|
||||
string key = keys[i];
|
||||
string value = form[key];
|
||||
if (!string.IsNullOrEmpty(key) && !string.IsNullOrEmpty(value))
|
||||
{
|
||||
content.Append((index == 0 ? "" : "&") + key + "=" + value);
|
||||
index++;
|
||||
}
|
||||
}
|
||||
return content.ToString();
|
||||
}
|
||||
}
|
||||
}
|
@@ -29,7 +29,9 @@ namespace SDKTest
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
TestGet();
|
||||
Console.WriteLine("--------------------");
|
||||
TestCommon();
|
||||
Console.WriteLine("--------------------");
|
||||
TestUpload();
|
||||
}
|
||||
|
||||
@@ -103,7 +105,10 @@ namespace SDKTest
|
||||
};
|
||||
request.BizModel = model;
|
||||
|
||||
string root = Environment.CurrentDirectory;
|
||||
string workDir = Environment.CurrentDirectory;
|
||||
int index = workDir.LastIndexOf(@"/bin/Debug", StringComparison.Ordinal);
|
||||
string root = workDir.Substring(0, index);
|
||||
|
||||
Console.WriteLine("当前目录{0}", root);
|
||||
|
||||
// 文件上传
|
||||
|
Reference in New Issue
Block a user