示例#1
0
        /// <summary>
        ///     NOTE: Code-generation-invoked method, method name and parameter order matters
        /// </summary>
        /// <param name="joinExecutionStrategy">join strategy</param>
        /// <param name="resultSetProcessor">processor</param>
        /// <param name="parentView">view</param>
        /// <param name="distinct">flag</param>
        /// <param name="distinctKeyGetter"></param>
        /// <returns>iterator</returns>
        public static IEnumerator<EventBean> GetEnumerator(
            JoinExecutionStrategy joinExecutionStrategy,
            ResultSetProcessor resultSetProcessor,
            Viewable parentView,
            bool distinct,
            EventPropertyValueGetter distinctKeyGetter)
        {
            IEnumerator<EventBean> enumerator;
            if (joinExecutionStrategy != null) {
                var joinSet = joinExecutionStrategy.StaticJoin();
                enumerator = resultSetProcessor.GetEnumerator(joinSet);
            }
            else if (resultSetProcessor != null) {
                enumerator = resultSetProcessor.GetEnumerator(parentView);
            }
            else {
                enumerator = parentView.GetEnumerator();
            }

            if (!distinct) {
                return enumerator;
            }

            return EventDistinctEnumerator.For(enumerator, distinctKeyGetter);
        }
示例#2
0
        public static IEnumerator <EventBean> GetEnumerator(JoinExecutionStrategy joinExecutionStrategy, ResultSetProcessor resultSetProcessor, Viewable parentView, bool distinct)
        {
            IEnumerator <EventBean> enumerator;
            EventType eventType;

            if (joinExecutionStrategy != null)
            {
                var joinSet = joinExecutionStrategy.StaticJoin();
                enumerator = resultSetProcessor.GetEnumerator(joinSet);
                eventType  = resultSetProcessor.ResultEventType;
            }
            else if (resultSetProcessor != null)
            {
                enumerator = resultSetProcessor.GetEnumerator(parentView);
                eventType  = resultSetProcessor.ResultEventType;
            }
            else
            {
                enumerator = parentView.GetEnumerator();
                eventType  = parentView.EventType;
            }

            if (!distinct)
            {
                return(enumerator);
            }

            return(DistinctEnumeration(enumerator, eventType));
        }