Esempio n. 1
0
 public EventWrapper(DomainEvent @event, int eventNumber, string streamStateId)
 {
     Event = @event;     
     EventNumber = eventNumber;
     EventStreamId = streamStateId;
     Id = string.Format("{0}-{1}", streamStateId, EventNumber);
 }
Esempio n. 2
0
 public abstract void Apply(DomainEvent changes);
Esempio n. 3
0
 private void Causes(DomainEvent @event)
 {            
     Changes.Add(@event);
     Apply(@event);
 }
Esempio n. 4
0
        public EventWrapper RegisterEvent(DomainEvent @event)
        {
            Version ++;

            return new EventWrapper(@event, Version, Id);
        }
Esempio n. 5
0
 public override void Apply(DomainEvent @event)
 {            
     When((dynamic)@event);  
     Version = Version ++;
 }