duhe
2025-03-12 90b8b9b16b9b91669c82fda653167f9dc99889d0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
using System.Collections.Generic;
 
namespace Top.Api
{
    /// <summary>
    /// 批量API请求包装类。
    /// </summary>
    public class TopBatchRequest : BaseTopRequest<TopBatchResponse>
    {
        /// <summary>
        /// 公共方法
        /// </summary>
        public string PublicMethod { get; set; }
 
        /// <summary>
        /// 公共参数
        /// </summary>
        public TopDictionary PublicParams { get; set; }
 
        public List<ITopRequest<TopResponse>> RequestList { get; set; }
 
        public void AddPublicParam(string key, string value)
        {
            if (this.PublicParams == null)
            {
                this.PublicParams = new TopDictionary();
            }
            this.PublicParams.Add(key, value);
        }
 
        public TopBatchRequest AddRequest<T>(ITopRequest<T> request) where T : TopResponse
        {
            if (this.RequestList == null)
            {
                this.RequestList = new List<ITopRequest<TopResponse>>();
            }
            this.RequestList.Add(request);
            return this;
        }
 
 
        public override string GetApiName()
        {
            return null;
        }
 
        public override void Validate()
        {
        }
 
        public override IDictionary<string, string> GetParameters()
        {
            return null;
        }
    }
}