internal void RaisePositionsReceived(CollectionReceivedEventArgs <BitFlyerPosition> e) { if (e.Action == NotifyCollectionChangedAction.Reset || e?.Data?.Count > 0) { PositionsReceived?.Invoke(this, e); } }
public QueryPositionResponse QueryPositions(RequestHeader header, QueryPositionRequest payload) { NetMQMessage response = Channels.SendRequest(BuildMessage(header, payload)); ResponseHeader responseHeader = ResponseHeader.Parser.ParseFrom(response.Pop().ToByteArray()); WriteLog(responseHeader.ToString()); QueryPositionResponse responsePayload = QueryPositionResponse.Parser.ParseFrom(response.Pop().ToByteArray()); WriteLog(responsePayload.ToString()); PositionsReceived?.Invoke(responsePayload); return(responsePayload); }
protected virtual void OnPositionsReceived(string data) { PositionsReceived?.Invoke(this, data); }