private void Apply(FruitCreatedEvent e) { Weight = e.Weight; Id = e.Id; FruitCondition = e.Condition; TypeOfFruit = e.TypeOfFruit; }
private void Summon(string fruitId, decimal weight, FruitCondition condition, TypeOfFruit type) { var ev = new FruitCreatedEvent(fruitId, weight, condition, type); _events.Add(ev); Apply((dynamic)ev); }