void IExchangeInfoProvider.Save(ExchangeBoard board) { if (board == null) { throw new ArgumentNullException(nameof(board)); } lock (_boards.SyncRoot) { if (!_boards.TryAdd(board.Code, board)) { return; } } BoardAdded.SafeInvoke(board); }
/// <summary> /// To save the board. /// </summary> /// <param name="board">Trading board.</param> public void Save(ExchangeBoard board) { if (board == null) { throw new ArgumentNullException(nameof(board)); } _entityRegistry.ExchangeBoards.Save(board); lock (_boards.SyncRoot) { if (!_boards.TryAdd(board.Code, board)) { return; } } BoardAdded.SafeInvoke(board); }