Ejemplo n.º 1
0
 public ProjectionEvent(Guid id, Event @event, DateTime dateRegistered, long sequenceNumber)
 {
     DateRegistered = dateRegistered;
     Event = @event;
     Id = id;
     SequenceNumber = sequenceNumber;
 }
Ejemplo n.º 2
0
		public EventStream(Guid id, int version, IEnumerable<Event> events, Event snapshot)
		{
			Id = id;
			Version = version;
			_initialVersion = version;
			Snapshot = snapshot;

			if (events != null)
			{
				_events.AddRange(events);
			}
		}
Ejemplo n.º 3
0
	    public IEnumerable<Event> EventsAfter(Event @event)
		{
			return _events.Where(e => e.Version > @event.Version);
		}
Ejemplo n.º 4
0
		public void AddSnapshot(object data)
		{
			Guard.AgainstNull(data, "data");

			Snapshot = new Event(Version, data.GetType().AssemblyQualifiedName, data);
		}