private void AppendEvents( int numEventsToBeSent, IStreamStoreConnection conn, string streamName, int value) { for (int evtNumber = 0; evtNumber < numEventsToBeSent; evtNumber++) { var evt = new ReadModelTestEvent(evtNumber, value); conn.AppendToStream(streamName, ExpectedVersion.Any, null, Serializer.Serialize(evt)); } }
void IHandle <ReadModelTestEvent> .Handle(ReadModelTestEvent @event) { Sum += @event.Value; Count++; }