Ejemplo n.º 1
0
 private GeneratedBatchContainer GenerateBatch()
 {
     sequenceId++;
     var evt = new GeneratedEvent
     {
         // If this is the last event generated, mark it as such, so test grains know to report results.
         EventType = (sequenceId != config.EventsInStream)
                 ? GeneratedEvent.GeneratedEventType.Fill
                 : GeneratedEvent.GeneratedEventType.Report,
     };
     return new GeneratedBatchContainer(streamGuid, config.StreamNamespace, evt, new EventSequenceTokenV2(sequenceId));
 }
Ejemplo n.º 2
0
        private GeneratedBatchContainer GenerateBatch()
        {
            sequenceId++;
            var evt = new GeneratedEvent
            {
                // If this is the last event generated, mark it as such, so test grains know to report results.
                EventType = (sequenceId != config.EventsInStream)
                        ? GeneratedEvent.GeneratedEventType.Fill
                        : GeneratedEvent.GeneratedEventType.Report,
            };

            return(new GeneratedBatchContainer(streamGuid, config.StreamNamespace, evt, new EventSequenceTokenV2(sequenceId)));
        }
Ejemplo n.º 3
0
        private bool TryGenerateBatch(out GeneratedBatchContainer batch)
        {
            batch = null;
            if (sequenceId >= this.options.EventsInStream)
            {
                return(false);
            }
            sequenceId++;
            var evt = new GeneratedEvent
            {
                // If this is the last event generated, mark it as such, so test grains know to report results.
                EventType = (sequenceId != this.options.EventsInStream)
                        ? GeneratedEvent.GeneratedEventType.Fill
                        : GeneratedEvent.GeneratedEventType.Report
            };

            batch = new GeneratedBatchContainer(streamId, evt, new EventSequenceTokenV2(sequenceId));
            return(true);
        }