private static void RunRules(IDomainAggregate <T> rulesInterface, T target) { foreach (var rule in rulesInterface.Rules.Where(r => r.StateConditions.All(c => c(target))).SelectMany(r => r.StateActions)) { rule(target); } }
public AggregateKey(IDomainAggregate domainAggregate) : this(domainAggregate.GetType(), domainAggregate.AggregateId) { }