public virtual void Apply <TAggregate>(TAggregate state, IAggregator <TAggregate> aggregator) where TAggregate : class, new() { var step = aggregator.AggregatorFor <T>(); if (step is IAggregationWithMetadata <TAggregate, T> ) { step.As <IAggregationWithMetadata <TAggregate, T> >() .Apply(state, this); } else { step?.Apply(state, Data); } }
public virtual void Apply <TAggregate>(TAggregate state, IAggregator <TAggregate> aggregator) where TAggregate : class, new() { aggregator.AggregatorFor <T>()?.Apply(state, Data); }