public static string ToFormattedString([In] this QuoteRequestField field) { return(string.Format("[TradingDay={0};InstrumentID={1};ExchangeID={2};QuoteID={3};QuoteTime={4}]", field.TradingDay, field.InstrumentID, field.ExchangeID, field.QuoteID, field.QuoteTime)); }
private void OnRtnQuoteRequest_callback(object sender, ref QuoteRequestField quoteRequest) { (sender as XApi).Log.Info("OnRtnQuoteRequest:" + quoteRequest.ToFormattedString()); MarketDataRecord record; if (!marketDataRecords.TryGetValue(quoteRequest.Symbol, out record)) { return; } NewsEx news = new NewsEx(DateTime.Now, this.id, record.Instrument.Id, NewsUrgency.Flash, "", "", quoteRequest.ToFormattedString()); news.ResponeType = ResponeType.OnRtnQuoteRequest; news.UserData = quoteRequest; EmitData(news); }