CsvEntityRegistry
StockSharp.Algo.Storages.Csv
The CSV storage of trading objects.
Inherits: AsyncDisposable
Implements: IEntityRegistry, IAsyncDisposable
Constructors
CsvEntityRegistry
public CsvEntityRegistry(string path, ChannelExecutor executor)
csvEntityRegistry = CsvEntityRegistry(path, executor)
Initializes a new instance of the CsvEntityRegistry.
- path
- The path to data directory.
- executor
- Sequential operation executor for disk access synchronization.
CsvEntityRegistry
public CsvEntityRegistry(IFileSystem fileSystem, string path, ChannelExecutor executor)
csvEntityRegistry = CsvEntityRegistry(fileSystem, path, executor)
Initializes a new instance of the CsvEntityRegistry.
- fileSystem
- IFileSystem
- path
- The path to data directory.
- executor
- Sequential operation executor for disk access synchronization.
Properties
Encoding
public Encoding Encoding { get; set; }
value = csvEntityRegistry.Encoding
csvEntityRegistry.Encoding = value
Encoding.
ExchangeBoards
public IStorageEntityList<ExchangeBoard> ExchangeBoards { get; }
value = csvEntityRegistry.ExchangeBoards
The list of stock boards.
Exchanges
public IStorageEntityList<Exchange> Exchanges { get; }
value = csvEntityRegistry.Exchanges
List of exchanges.
Path
public string Path { get; set; }
value = csvEntityRegistry.Path
csvEntityRegistry.Path = value
The path to data directory.
Portfolios
public IStorageEntityList<Portfolio> Portfolios { get; }
value = csvEntityRegistry.Portfolios
The list of portfolios.
Positions
public IStoragePositionList Positions { get; }
value = csvEntityRegistry.Positions
The list of positions.
PositionStorage
public IPositionStorage PositionStorage { get; }
value = csvEntityRegistry.PositionStorage
Position storage.
Securities
public IStorageSecurityList Securities { get; }
value = csvEntityRegistry.Securities
The list of instruments.
Subscriptions
public IStorageEntityList<MarketDataMessage> Subscriptions { get; }
value = csvEntityRegistry.Subscriptions
The list of subscriptions.
Methods
Add``2
public void Add<TKey, TEntity>(CsvEntityList<TKey, TEntity> list)
csvEntityRegistry.Add(list)
Add list of trade objects.
- list
- List of trade objects.
DisposeManaged
protected override ValueTask DisposeManaged()
result = csvEntityRegistry.DisposeManaged()
Release resources.
InitAsync
public ValueTask<Dictionary<object, Exception>> InitAsync(CancellationToken cancellationToken)
result = csvEntityRegistry.InitAsync(cancellationToken)
Initialize the storage.
Returns: Possible errors with storage names. Empty dictionary means initialization without any issues.