private string SerializeRequest(OptionProcessingService.Types.Message request) { return(JsonConvert.SerializeObject(request)); }
//private void ProcessHistoryResponse(HistoryResponse histMessage) //{ // AppendToLog("History Message"); // foreach (var bar in histMessage.Bars) // { // AppendToLog(string.Format("{0} O:{1} H:{2} L:{3} C:{4} V:{5}", bar.Date.ToString(), bar.Open, bar.High, bar.Low, bar.Close, bar.Volume)); // } //} //private void ProcessNewTickResponse(NewTickResponse tickMessage) //{ // foreach (var tick in tickMessage.Tick) // { // AppendToLog(string.Format("{0}:{1} - Price:{2} Volume:{3}", tick.Symbol.DataFeed, tick.Symbol.Symbol, tick.Price, tick.Volume)); // } //} //private void ProcessDataFeedListResponse(DataFeedListResponse response) //{ // _DataFeeds = response.DataFeeds.ToArray(); // InvokeIfRequired(cmbL1DataFeeds, InitDataFeedControl); // EnabledControls(true); //} /// <summary> /// Send provided Request to Server through socket /// </summary> /// <param name="request"></param> private void Send(OptionProcessingService.Types.Message request) { var serializedMsg = SerializeRequest(request); _socket.Send(serializedMsg); }