using System; using Top.Api; namespace Qimen.Api { public abstract class QimenRequest where T : QimenResponse { /// /// 自定义URL参数 /// private TopDictionary queryParameters; public TopDictionary GetQueryParameters() { return this.queryParameters; } public void AddQueryParameter(string key, string value) { if (this.queryParameters == null) { this.queryParameters = new TopDictionary(); } this.queryParameters[key] = value; } private TopDictionary headerParameters; public TopDictionary GetHeaderParameters() { return this.headerParameters; } public void AddHeaderParameter(string key, string value) { if (this.headerParameters == null) { this.headerParameters = new TopDictionary(); } this.headerParameters[key] = value; } /// /// 客户ID号 /// public string CustomerId { get; set; } /// /// 请求时间戳 /// public DateTime Timestamp { get; set; } private string _version = "1.0"; /// /// API版本号 /// public string Version { get { return this._version; } set { this._version = value; } } /// /// 测试类型 /// public string TestType { get; set; } /// /// 请求body体 /// public string Body { get; set; } /// /// 获取API名称 /// /// public abstract string GetApiName(); } }