Exemplo n.º 1
0
        /// <summary>
        /// NOTE: Code-generation-invoked method, method name and parameter order matters
        /// </summary>
        /// <param name="streamNum">stream</param>
        /// <param name="eventToPublic">conversion</param>
        /// <param name="eventsPerStream">events</param>
        /// <param name="isNewData">flag</param>
        /// <param name="context">context</param>
        /// <returns>event</returns>
        public static object[] EvaluateConvertTableEventToUnd(
            int streamNum,
            TableMetadataInternalEventToPublic eventToPublic,
            EventBean[] eventsPerStream,
            bool isNewData,
            ExprEvaluatorContext context)
        {
            EventBean @event = eventsPerStream[streamNum];
            if (@event == null) {
                return null;
            }

            return eventToPublic.ConvertToUnd(@event, eventsPerStream, isNewData, context);
        }
Exemplo n.º 2
0
        /// <summary>
        /// NOTE: Code-generation-invoked method, method name and parameter order matters
        /// </summary>
        /// <param name="target">target</param>
        /// <param name="eventToPublic">conversion</param>
        /// <param name="eventsPerStream">events</param>
        /// <param name="isNewData">new data flow</param>
        /// <param name="exprEvaluatorContext">context</param>
        /// <returns>events</returns>
        public static ICollection<object[]> ConvertToTableUnderling(
            object target,
            TableMetadataInternalEventToPublic eventToPublic,
            EventBean[] eventsPerStream,
            bool isNewData,
            ExprEvaluatorContext exprEvaluatorContext)
        {
            if (target == null) {
                return null;
            }

            var events = ((FlexCollection) target).EventBeanCollection;
            var underlyings = new ArrayDeque<object[]>(events.Count);
            foreach (var @event in events) {
                underlyings.Add(eventToPublic.ConvertToUnd(@event, eventsPerStream, isNewData, exprEvaluatorContext));
            }

            return underlyings;
        }