Esempio n. 1
0
                bool IEnumerator.MoveNext()
                {
                    while (_itemsEnumerator.MoveNext())
                    {
                        var item = _itemsEnumerator.Current;

                        if (_builder == null)
                        {
                            _builder = new OrderLogMarketDepthBuilder(new QuoteChangeMessage {
                                SecurityId = item.SecurityId, IsSorted = true
                            }, _maxDepth);
                        }

                        if (!_builder.Update(item))
                        {
                            continue;
                        }

                        if (Current != null && (_builder.Depth.ServerTime - Current.ServerTime) < _interval)
                        {
                            continue;
                        }

                        Current = (QuoteChangeMessage)_builder.Depth.Clone();
                        //Current.MaxDepth = _maxDepth;
                        return(true);
                    }

                    Current = null;
                    return(false);
                }