| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- using System;
- using System.Collections.Generic;
- using MuchInfo.Chart.Data.EnumTypes;
- using MuchInfo.Chart.Data.Interfaces;
- namespace MuchInfo.Chart.DataAccess
- {
- /// <summary>
- /// 请求历史周期数据点(1分钟线,5分钟线,30分钟线,240分钟线,日线...)
- /// </summary>
- public interface IDataAccess
- {
- #region Methods
- /// <summary>
- /// 获取数据
- /// </summary>
- /// <param name="symbol">商品代码</param>
- /// <param name="cycleType">周期类型</param>
- /// <param name="startTime">起始时间</param>
- /// <param name="endTime">结束时间</param>
- /// <param name="totalCount">记录条数</param>
- IEnumerable<IBarDataPoint> GetDataPoints(string symbol, CycleType cycleType, DateTime startTime, DateTime endTime, int totalCount);
- /// <summary>
- /// 获取数据
- /// </summary>
- /// <param name="symbol">商品代码</param>
- /// <param name="timeSpan">The time span.</param>
- /// <param name="startTime">起始时间</param>
- /// <param name="endTime">结束时间</param>
- /// <param name="totalCount">记录条数</param>
- /// <returns>IEnumerable{IBarDataPoint}.</returns>
- IEnumerable<IBarDataPoint> GetDataPoints(string symbol, TimeSpan timeSpan, DateTime startTime, DateTime endTime, int totalCount);
- /// <summary>
- /// 保存数据
- /// </summary>
- /// <param name="symbol">商品代码</param>
- /// <param name="cycleType">周期类型</param>
- /// <param name="dataPoints">保存的数据</param>
- void SaveDataPoints(string symbol, CycleType cycleType, IList<IBarDataPoint> dataPoints);
- /// <summary>
- /// 保存数据
- /// </summary>
- /// <param name="symbol">商品代码</param>
- /// <param name="timeSpan">The time span.</param>
- /// <param name="dataPoints">保存的数据</param>
- void SaveDataPoints(string symbol, TimeSpan timeSpan, IList<IBarDataPoint> dataPoints);
- #endregion Methods
- }
- }
|