namespace Easychart.Finance.DataProvider { using Easychart.Finance.DataClient; using System; public class DataClientDataManager : DataManagerBase { private DataClientBase DataClient; private bool Intraday; public DataClientDataManager(DataClientBase DataClient, bool Intraday) { this.DataClient = DataClient; this.Intraday = Intraday; } public override IDataProvider GetData(string Code, int Count) { if (this.DataClient.Logined) { CommonDataProvider historicalData; if (this.Intraday) { historicalData = this.DataClient.GetIntradayData(Code, 1, base.StartTime, base.EndTime); } else { historicalData = this.DataClient.GetHistoricalData(Code); } historicalData.SetStringData("Code", Code); return historicalData; } return base.GetData(Code, Count); } } }