Exemplo n.º 1
0
        /// <summary>
        /// Ctor.
        /// </summary>
        /// <param name="agentInstanceViewFactoryContext">The agent instance view factory context.</param>
        /// <param name="factory">the view _factory</param>
        /// <param name="viewList">the list of data window views</param>
        public IntersectDefaultView(
            AgentInstanceViewFactoryChainContext agentInstanceViewFactoryContext,
            IntersectViewFactory factory,
            IList<View> viewList)
        {
            AgentInstanceViewFactoryContext = agentInstanceViewFactoryContext;
            _factory = factory;
            mViews = viewList.ToArray();

            for (int i = 0; i < viewList.Count; i++)
            {
                LastPostObserverView view = new LastPostObserverView(i);
                mViews[i].RemoveAllViews();
                mViews[i].AddView(view);
                view.Observer = this;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Ctor.
        /// </summary>
        /// <param name="agentInstanceViewFactoryContext">The agent instance view factory context.</param>
        /// <param name="factory">the view factory</param>
        /// <param name="eventType">the parent event type</param>
        /// <param name="viewList">the list of data window views</param>
        public IntersectAsymetricView(
            AgentInstanceViewFactoryChainContext agentInstanceViewFactoryContext,
            IntersectViewFactory factory,
            EventType eventType,
            IList <View> viewList)
        {
            _agentInstanceViewFactoryContext = agentInstanceViewFactoryContext;
            _intersectViewFactory            = factory;
            _eventType        = eventType;
            _views            = viewList.ToArray();
            _oldEventsPerView = new EventBean[viewList.Count][];

            for (int i = 0; i < viewList.Count; i++)
            {
                var view = new LastPostObserverView(i);
                _views[i].RemoveAllViews();
                _views[i].AddView(view);
                view.Observer = this;
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Ctor.
        /// </summary>
        /// <param name="agentInstanceViewFactoryContext">The agent instance view factory context.</param>
        /// <param name="factory">the view factory</param>
        /// <param name="eventType">the parent event type</param>
        /// <param name="viewList">the list of data window views</param>
        /// <param name="viewFactories">view factories</param>
        /// <param name="hasAsymetric">if set to <c>true</c> [has asymetric].</param>
        public IntersectBatchView(
            AgentInstanceViewFactoryChainContext agentInstanceViewFactoryContext,
            IntersectViewFactory factory,
            EventType eventType,
            IList <View> viewList,
            IList <ViewFactory> viewFactories,
            bool hasAsymetric)
        {
            _agentInstanceViewFactoryContext = agentInstanceViewFactoryContext;
            _intersectViewFactory            = factory;
            _eventType        = eventType;
            _views            = viewList.ToArray();
            _oldEventsPerView = new EventBean[viewList.Count][];
            _newEventsPerView = new EventBean[viewList.Count][];
            _hasAsymetric     = hasAsymetric;

            // determine index of batch view
            _batchViewIndex = -1;
            for (int i = 0; i < viewFactories.Count; i++)
            {
                if (viewFactories[i] is DataWindowBatchingViewFactory)
                {
                    _batchViewIndex = i;
                }
            }
            if (_batchViewIndex == -1)
            {
                throw new IllegalStateException("Failed to find batch data window view");
            }

            for (int i = 0; i < viewList.Count; i++)
            {
                var view = new LastPostObserverView(i);
                _views[i].RemoveAllViews();
                _views[i].AddView(view);
                view.Observer = this;
            }
        }