コード例 #1
0
        public void AddBeforeTuple(FoxBeforeCapturePriceTuple tuple)
        {
            String slideKey = FoxCaptureSlide.CreateKey(tuple.InsertedTime, tuple.GroupID);

            if (_dic.ContainsKey(slideKey))
            {
                _dic[slideKey].AddBeforeCaptureTuple(tuple);
            }
            else
            {
                Debug.Assert(false);
            }
        }
コード例 #2
0
 public void AddBeforeCaptureTuple(FoxBeforeCapturePriceTuple tuple)
 {
     _beforeCaptureList.Add(tuple);
 }
コード例 #3
0
        void SaveBeforeData_Raw(FoxRawDataEachCollector ec, ref ArrayList queries)
        {
            for (int i = 15; i >= 1; --i)
            {
                DateTime insertedTime = _insertedTime;
                int groupID = this._slide.GroupID;
                String code = ec.Code;
                int timeOffset = (-1) * i;

                int negativeMilliSec = (int)CommonConst._1_000 * timeOffset;
                FoxPriceDatum datum = ec.PriceData.GetDatumViaOffsetMilliSec(negativeMilliSec);

                if (datum == null)
                {
                    continue;
                }

                double curPrice = datum.Price;

                FoxBeforeCapturePriceTuple beforeTuple = new FoxBeforeCapturePriceTuple();
                beforeTuple.Code = code;
                beforeTuple.GroupID = groupID;
                beforeTuple.TimeOffset = timeOffset;
                beforeTuple.CurPrice = curPrice;

                _slide.AddBeforeCaptureTuple(beforeTuple);

                String query = GetBeforePriceQuery(insertedTime, groupID, code, timeOffset, curPrice);
                queries.Add(query);
            }
        }