public void Store(IEnumerable <Event> e) { foreach (var evt in e) { var source = evt.Source; var vnext = _db.Any(source) ? _db.GetVersion(source) + 1 : 0; var envelope = new EventEnvelope { Zeit = DateTime.Now, Source = source, Event = evt, Inkrement = _inkrement++, SourceVersion = vnext }; _db.Add(envelope); } }
public void Store(IEnumerable<Event> e) { foreach (var evt in e) { var source = evt.Source; var vnext = _db.Any(source) ? _db.GetVersion(source) + 1 : 0; var envelope = new EventEnvelope { Zeit=DateTime.Now, Source = source, Event = evt, Inkrement = _inkrement++, SourceVersion = vnext }; _db.Add(envelope); } }
public void Add(EventEnvelope envelope) { _historie.Add(envelope); }
private LogLine CreateLogLine(EventEnvelope envelope) { return new LogLine {Lfd = envelope.Inkrement, Zeit = envelope.Zeit, Ereignis = envelope.Event.ToString(), Source=envelope.Source.ToString(), Version=envelope.SourceVersion}; }