Пример #1
0
        private void ProcessAdd(AggregationChange change)
        {
            Debug.Assert(change.Type == ChangeType.Add);

            if (HasGroupResults)
            {
                AggregationResult groupResult;

                var key = change.Entity.GetKey(_keyIndex);
                if (!_groupResults.TryGetValue(key, out groupResult))
                {
                    groupResult = new AggregationResult(_metadata, _config, _keyIndex + 1);
                    _groupResults.Add(key, groupResult);
                }

                groupResult.Post(change);
            }

            foreach (var u in change.Updates)
            {
                _aggregators[u.Config.Index].Add(u.Values);
            }
        }
Пример #2
0
 public AggregationRoot(EntitySet set, AggregationConfig config, EntityMetadata metadata)
     : base(set, config)
 {
     _result = new AggregationResult(metadata, config, 0);
 }
Пример #3
0
        private void ProcessAdd(AggregationChange change)
        {
            Debug.Assert(change.Type == ChangeType.Add);

            if (HasGroupResults) {
                AggregationResult groupResult;

                var key = change.Entity.GetKey(_keyIndex);
                if (!_groupResults.TryGetValue(key, out groupResult)) {
                    groupResult = new AggregationResult(_metadata, _config, _keyIndex + 1);
                    _groupResults.Add(key, groupResult);
                }

                groupResult.Post(change);
            }

            foreach (var u in change.Updates) {
                _aggregators[u.Config.Index].Add(u.Values);
            }
        }
Пример #4
0
 public AggregationRoot(EntitySet set, AggregationConfig config, EntityMetadata metadata)
     : base(set, config)
 {
     _result = new AggregationResult(metadata, config, 0);
 }