private void OnSessionOrderBookStatusChanged(OrderBookStatusEvent orderBookStatusEvent) { SecurityStates state; switch (orderBookStatusEvent.Status) { case OrderBookStatus.New: case OrderBookStatus.Opened: state = SecurityStates.Trading; break; case OrderBookStatus.Suspended: case OrderBookStatus.Closed: case OrderBookStatus.Settled: case OrderBookStatus.Withdrawn: state = SecurityStates.Stoped; break; default: throw new ArgumentOutOfRangeException(); } SendOutMessage( new Level1ChangeMessage { SecurityId = new SecurityId { Native = orderBookStatusEvent.InstrumentId }, ServerTime = CurrentTime.Convert(TimeZoneInfo.Utc), } .Add(Level1Fields.State, state)); }
public bool Equals(OrderBookStatusEvent other) { if (object.ReferenceEquals((object)null, (object)other)) { return(false); } if (object.ReferenceEquals((object)this, (object)other)) { return(true); } return(other._instrumentId == this._instrumentId && other._status == this._status); }
public bool Equals(OrderBookStatusEvent other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(other._instrumentId == _instrumentId && other._status == _status); }
public bool Equals(OrderBookStatusEvent other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return other._instrumentId == _instrumentId && other._status == _status; }