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); } }
public AggregationRoot(EntitySet set, AggregationConfig config, EntityMetadata metadata) : base(set, config) { _result = new AggregationResult(metadata, config, 0); }