private static ResponseCandle GetCandleHistoryDto(IList <Candle> candle) { if (candle == null) { Console.WriteLine("Candle empty"); return(null); } var result = new ResponseCandle { Text = "something", Payload = new List <CandleDto>() }; var candleDto = candle.Select(c => new CandleDto() { Timestamp = c.Timestamp, BidOpen = c.BidOpen, BidHigh = c.BidHigh, BidLow = c.BidLow, BidClose = c.BidClose, AskOpen = c.AskOpen, AskHigh = c.AskHigh, AskLow = c.AskLow, AskClose = c.AskClose, TickQty = c.TickQty }) .ToList(); result.Payload = candleDto; return(result); }
public void PublishCandleMessage(ResponseCandle message) { using (var bus = RabbitHutch.CreateBus(Host)) { bus.Publish <ResponseCandle>(message); } }
private static void PublishMessage(ResponseCandle message) { INetQPublish p = new NetQPublish(); p.PublishCandleMessage(message); }