You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
SOP/sop-sdk/sdk-csharp/SDKCSharp/Common/OpenConfig.cs

137 lines
3.6 KiB

6 years ago
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SDKCSharp;
5 years ago
using SDKCSharp.Utility;
6 years ago
namespace SDKCSharp.Common
{
public class OpenConfig
{
5 years ago
public static DataNameBuilder DATA_NAME_BUILDER = new DefaultDataNameBuilder();
6 years ago
/// <summary>
/// 返回码成功值
/// </summary>
5 years ago
public string SuccessCode { get; set; } = "10000";
6 years ago
/// <summary>
/// 默认版本号
/// </summary>
5 years ago
public string DefaultVersion { get; set; } = "1.0";
/// <summary>
/// 字符编码
/// </summary>
/// <value>The charset.</value>
public Encoding Charset { get; set; } = Encoding.UTF8;
/// <summary>
/// 签名类型
/// </summary>
/// <value>The type of the sign.</value>
public SignType SignType { get; set; } = SignType.RSA2;
/// <summary>
/// 格式类型
/// </summary>
public string FormatType { get; set; } = "json";
/// <summary>
/// 时间戳格式
/// </summary>
public string TimestampPattern { get; set; } = "yyyy-MM-dd HH:mm:ss";
6 years ago
/// <summary>
/// 接口属性名
/// </summary>
5 years ago
public string MethodName { get; set; } = "method";
6 years ago
/// <summary>
/// 版本号名称
/// </summary>
5 years ago
public string VersionName { get; set; } = "version";
6 years ago
/// <summary>
/// 编码名称
/// </summary>
/// <value>The name of the charset.</value>
5 years ago
public string CharsetName { get; set; } = "charset";
6 years ago
/// <summary>
/// appKey名称
/// </summary>
5 years ago
public string AppKeyName { get; set; } = "app_id";
6 years ago
/// <summary>
/// data名称
/// </summary>
5 years ago
public string DataName { get; set; } = "biz_content";
6 years ago
/// <summary>
/// 时间戳名称
/// </summary>
5 years ago
public string TimestampName { get; set; } = "timestamp";
6 years ago
/// <summary>
5 years ago
/// 签名串名称
6 years ago
/// </summary>
5 years ago
public string SignName { get; set; } = "sign";
6 years ago
5 years ago
/// <summary>
/// 签名类型名称
6 years ago
/// </summary>
5 years ago
/// <value>The name of the sign type.</value>
public string SignTypeName { get; set; } = "sign_type";
6 years ago
/// <summary>
/// 格式化名称
/// </summary>
5 years ago
public string FormatName { get; set; } = "format";
6 years ago
/// <summary> accessToken名称
/// </summary>
5 years ago
public string AccessTokenName { get; set; } = "app_auth_token";
6 years ago
/// <summary>
/// 国际化语言
/// </summary>
5 years ago
public string Locale { get; set; } = "zh-CN";
6 years ago
/// <summary>
/// 响应code名称
/// </summary>
5 years ago
public string ResponseCodeName { get; set; } = "code";
/// <summary>
/// 错误响应节点
/// </summary>
/// <value>The name of the error response.</value>
public string ErrorResponseName { get; set; } = "error_response";
6 years ago
/// <summary>
/// 请求超时时间
/// </summary>
5 years ago
public int ConnectTimeoutSeconds { get; set; } = 10;
6 years ago
/// <summary>
/// http读取超时时间
/// </summary>
5 years ago
public int ReadTimeoutSeconds { get; set; } = 10;
6 years ago
/// <summary>
/// 节点名称构造器
/// </summary>
/// <value>The data name builder.</value>
5 years ago
public DataNameBuilder DataNameBuilder { get; set; } = DATA_NAME_BUILDER;
6 years ago
}
}