CsvEntityList
StockSharp.Algo.Storages.Csv
交易对象列表,收自CSV存储器.
继承自: SynchronizedList<T>
实现: IStorageEntityList<T>, INotifyList<T>, INotifyCollection<T>, ICollection<T>, IEnumerable<T>, IEnumerable, IList<T>, ISynchronizedCollection<T>, ISynchronizedCollection, ISynchronizable, ICsvEntityList, IAsyncDisposable
构造函数
CsvEntityList
protected CsvEntityList(CsvEntityRegistry registry, string fileName, ChannelExecutor executor)
csvEntityList = CsvEntityList(registry, fileName, executor)
初始化了 & ##CsvEntityList+#的新实例.
- registry
- 交易对象的 CSV 存储器 。
- fileName
- CSV文件名.
- executor
- 磁盘访问同步的序列操作执行器 。
属性
CreateArchivedCopy
public bool CreateArchivedCopy { get; set; }
value = csvEntityList.CreateArchivedCopy
csvEntityList.CreateArchivedCopy = value
创建存档副本.
Registry
protected CsvEntityRegistry Registry { get; }
value = csvEntityList.Registry
交易对象的 CSV 存储器 。
方法
AddCache
protected virtual void AddCache(TEntity item)
csvEntityList.AddCache(item)
添加项目到缓存 。
- item
- 新项目。
GetKey
protected abstract TKey GetKey(TEntity item)
result = csvEntityList.GetKey(item)
从交易对象那里取出密钥.
- item
- 贸易对象.
返回值: 钥匙
IsChanged
protected virtual bool IsChanged(TEntity entity, bool forced)
result = csvEntityList.IsChanged(entity, forced)
已经换了
- entity
- 贸易对象.
- forced
- 强制更新.
返回值: 已经换了
OnRemovedRange
protected void OnRemovedRange(IEnumerable<TEntity> items)
csvEntityList.OnRemovedRange(items)
Read
protected abstract TEntity Read(FastCsvReader reader)
result = csvEntityList.Read(reader)
从CSV读取数据.
- reader
- CSV阅读器.
返回值: 贸易对象.
RemoveCache
protected virtual void RemoveCache(TEntity item)
csvEntityList.RemoveCache(item)
从缓存中移除项目 。
- item
- 项目。
Save
public virtual void Save(TEntity entity, bool forced)
csvEntityList.Save(entity, forced)
将对象保存到存储中 。
- entity
- 贸易对象.
- forced
- 强制更新.
UpdateCache
protected virtual void UpdateCache(TEntity item)
csvEntityList.UpdateCache(item)
更新缓存中的项目 。
- item
- 项目。
WriteAsync
protected abstract ValueTask WriteAsync(CsvFileWriter writer, TEntity data, CancellationToken cancellationToken)
result = csvEntityList.WriteAsync(writer, data, cancellationToken)
将数据写入 CSV.
- writer
- CSV作家.
- data
- 贸易对象.
- cancellationToken
- CancellationToken
WriteMany
private void WriteMany(TEntity[] values)
csvEntityList.WriteMany(values)
将数据写入存储中 。
- values
- 交易对象.