/// <summary> /// 构造函数 /// </summary> /// <param name="maxCapacity">工厂中最多可管理的客户端总数</param> /// <param name="httpConfig">工厂中客户端的Http连接配置</param> public YfyClientFactory(int maxCapacity, YfyClientHttpConfig httpConfig) { this.MaxCapacity = maxCapacity; this.HttpConfig = httpConfig; this.YfyClients = new Dictionary <Tkey, LinkedListNode <LRUItems <Tkey, YfyClient> > >(2 * maxCapacity); this.LRUList = new LinkedList <LRUItems <Tkey, YfyClient> >(); }
/// <summary> /// 构造函数 /// </summary> /// <param name="oauth2AccessToken">AccessToken</param> /// <param name="oauth2RefreshToken">RefreshToken</param> /// <param name="httpConfig">SDK中Http请求的配置</param> public YfyClientConfig(string oauth2AccessToken, string oauth2RefreshToken, YfyClientHttpConfig httpConfig) : this(oauth2AccessToken, oauth2RefreshToken) { this.HttpConfig = httpConfig; }