InMemoryExchangeInfoProvider

StockSharp.BusinessEntities

The in memory provider of stocks and trade boards.

Implements: IExchangeInfoProvider, IBoardMessageProvider

Constructors

InMemoryExchangeInfoProvider
public InMemoryExchangeInfoProvider()
inMemoryExchangeInfoProvider = InMemoryExchangeInfoProvider()

Initializes a new instance of the InMemoryExchangeInfoProvider.

Properties

Boards
public IEnumerable<ExchangeBoard> Boards { get; }
value = inMemoryExchangeInfoProvider.Boards

All exchanges.

Exchanges
public IEnumerable<Exchange> Exchanges { get; }
value = inMemoryExchangeInfoProvider.Exchanges

All boards.

Methods

Delete
public virtual void Delete(Exchange exchange)
inMemoryExchangeInfoProvider.Delete(exchange)

Delete exchange.

exchange
Exchange.
Delete
public virtual void Delete(ExchangeBoard board)
inMemoryExchangeInfoProvider.Delete(board)

Delete exchange board.

board
Exchange board.
InitAsync
public virtual ValueTask InitAsync(CancellationToken cancellationToken)
result = inMemoryExchangeInfoProvider.InitAsync(cancellationToken)

Initialize the storage.

Save
public virtual void Save(ExchangeBoard board)
inMemoryExchangeInfoProvider.Save(board)

To save the board.

board
Trading board.
Save
public virtual void Save(Exchange exchange)
inMemoryExchangeInfoProvider.Save(exchange)

To save the exchange.

exchange
Exchange.
TryGetExchange
public Exchange TryGetExchange(string code)
result = inMemoryExchangeInfoProvider.TryGetExchange(code)

To get an exchange by the code.

code
The exchange code Name.

Returns: Exchange. If the exchange with the specified code does not exist, then will be returned.

TryGetExchangeBoard
public ExchangeBoard TryGetExchangeBoard(string code)
result = inMemoryExchangeInfoProvider.TryGetExchangeBoard(code)

To get a board by the code.

code
The board code Code.

Returns: Trading board. If the board with the specified code does not exist, then will be returned.

Events

BoardAdded
public event Action<ExchangeBoard> BoardAdded
inMemoryExchangeInfoProvider.BoardAdded += handler

Notification about adding a new board.

BoardRemoved
public event Action<ExchangeBoard> BoardRemoved
inMemoryExchangeInfoProvider.BoardRemoved += handler

Notification about removing the existing board.

ExchangeAdded
public event Action<Exchange> ExchangeAdded
inMemoryExchangeInfoProvider.ExchangeAdded += handler

Notification about adding a new exchange.

ExchangeRemoved
public event Action<Exchange> ExchangeRemoved
inMemoryExchangeInfoProvider.ExchangeRemoved += handler

Notification about removing the existing exchange.