private void stServer_UpdateQuote(string symbol, DateTime datetime, double open, double high, double low, double close, double last, double volume, double size, double bid, double ask, double bidsize, double asksize, double open_int, double go_buy, double go_sell, double go_base, double go_base_backed, double high_limit, double low_limit, int trading_status, double volat, double theor_price) { SymbolSummary item = new SymbolSummary(symbol, datetime, open, high, low, close, last, volume, size, ask, bid, asksize, bidsize, open_int, go_buy, go_sell, high_limit, low_limit, (trading_status == 0) ? true : false); this.logger.Log(String.Format("{0:dd/MM/yyyy H:mm:ss.fff}, {1}, получен {2}", BrokerDateTime.Make(DateTime.Now), this.GetType().Name, item.ToString())); this.symbolsData.Get <HashSetOfNamedMutable <SymbolSummary> >().Add(item); }
public void SymbolSummary_ToString_test() { DateTime lastDealDate = DateTime.Now; SymbolSummary sSummary = new SymbolSummary("RTS-12.13_FT", lastDealDate, 145000, 146000, 144000, 144990, 145800, 250, 50, 145790, 145780, 30, 40, 1000000, 8000, 8100, 151000, 142000, true); string result = String.Format("SymbolSummary: {0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11},{12},{13},{14},{15},{16},{17}", sSummary.Name, sSummary.LastDealDate, sSummary.Open, sSummary.High, sSummary.Low, sSummary.Close, sSummary.LastDealPrice, sSummary.Volume, sSummary.Offer, sSummary.Bid, sSummary.OfferSize, sSummary.BidSize, sSummary.OpenVolume, sSummary.BuyWarrantySum, sSummary.SellWarrantySum, sSummary.HighLimitPrice, sSummary.LowLimitPrice, sSummary.IsTraded); Assert.AreEqual(result, sSummary.ToString()); }