// public OTSClient(string configFileName) { } // TODO enable client config file later /// <summary> /// 通过客户端配置<see cref="OTSClientConfig"/>的实例来创建<see cref="OTSClient"/>实例。 /// </summary> /// <param name="config">客户端配置实例</param> public OTSClient(OTSClientConfig config) { ClientConfig = config; OTSHandler = new OTSHandler(); client = new HttpClient(); client.BaseAddress = new Uri(ClientConfig.EndPoint); ServicePointManager.DefaultConnectionLimit = config.ConnectionLimit; OTSClientTestHelper.Reset(); }
// public OTSClient(string configFileName) { } // TODO enable client config file later /// <summary> /// 通过客户端配置<see cref="OTSClientConfig"/>的实例来创建<see cref="OTSClient"/>实例。 /// </summary> /// <param name="config">客户端配置实例</param> public OTSClient(OTSClientConfig config) { ClientConfig = config; OTSHandler = new OTSHandler(); ConnectionPool = new OTSConnectionPool( ClientConfig.EndPoint, ClientConfig.ConnectionLimit ); OTSClientTestHelper.Reset(); }