Пример #1
0
        private void WrapAggregationAction(TInput row)
        {
            object key = GroupingFunc?.Invoke(row) ?? string.Empty;

            if (!AggregationData.ContainsKey(key))
            {
                AddRecordToDict(key);
            }

            TOutput currentAgg = AggregationData[key];

            AggregationAction.Invoke(row, currentAgg);
        }
Пример #2
0
        private void WrapAggregationAction(TInput row)
        {
            try
            {
                object key = GroupingFunc?.Invoke(row) ?? string.Empty;

                if (!AggregationData.ContainsKey(key))
                {
                    AddRecordToDict(key);
                }

                TOutput currentAgg = AggregationData[key];
                AggregationAction.Invoke(row, currentAgg);
            }
            catch (Exception e)
            {
                ThrowOrRedirectError(e, ErrorSource.ConvertErrorData <TInput>(row));
                return;
            }
        }