protected CoreProjectionCheckpointManager(
            IPublisher publisher, Guid projectionCorrelationId, ProjectionConfig projectionConfig, string name,
            PositionTagger positionTagger, ProjectionNamesBuilder namingBuilder, IResultEmitter resultEmitter,
            bool useCheckpoints, bool emitPartitionCheckpoints)
        {
            if (publisher == null) throw new ArgumentNullException("publisher");
            if (projectionConfig == null) throw new ArgumentNullException("projectionConfig");
            if (name == null) throw new ArgumentNullException("name");
            if (positionTagger == null) throw new ArgumentNullException("positionTagger");
            if (namingBuilder == null) throw new ArgumentNullException("namingBuilder");
            if (resultEmitter == null) throw new ArgumentNullException("resultEmitter");
            if (name == "") throw new ArgumentException("name");

            _lastProcessedEventPosition = new PositionTracker(positionTagger);
            _zeroTag = positionTagger.MakeZeroCheckpointTag();

            _publisher = publisher;
            _projectionCorrelationId = projectionCorrelationId;
            _projectionConfig = projectionConfig;
            _logger = LogManager.GetLoggerFor<CoreProjectionCheckpointManager>();
            _name = name;
            _namingBuilder = namingBuilder;
            _resultEmitter = resultEmitter;
            _useCheckpoints = useCheckpoints;
            _emitPartitionCheckpoints = emitPartitionCheckpoints;
            _requestedCheckpointState = new PartitionState("", null, _zeroTag);
            _currentProjectionState = new PartitionState("", null, _zeroTag);
        }
 public MultiStreamMultiOutputCheckpointManager(
     IPublisher publisher, Guid projectionCorrelationId, ProjectionVersion projectionVersion, IPrincipal runAs,
     RequestResponseDispatcher
         <ClientMessage.ReadStreamEventsBackward, ClientMessage.ReadStreamEventsBackwardCompleted> readDispatcher,
     RequestResponseDispatcher<ClientMessage.WriteEvents, ClientMessage.WriteEventsCompleted> writeDispatcher,
     ProjectionConfig projectionConfig, string name, PositionTagger positionTagger,
     ProjectionNamesBuilder namingBuilder, IResultEmitter resultEmitter, bool useCheckpoints,
     bool emitPartitionCheckpoints = false)
     : base(
         publisher, projectionCorrelationId, projectionVersion, runAs, readDispatcher, writeDispatcher,
         projectionConfig, name, positionTagger, namingBuilder, resultEmitter, useCheckpoints,
         emitPartitionCheckpoints)
 {
     _positionTagger = positionTagger;
 }
 public DefaultCheckpointManager(
     IPublisher publisher, Guid projectionCorrelationId, ProjectionVersion projectionVersion, IPrincipal runAs,
     RequestResponseDispatcher
         <ClientMessage.ReadStreamEventsBackward, ClientMessage.ReadStreamEventsBackwardCompleted> readDispatcher,
     RequestResponseDispatcher<ClientMessage.WriteEvents, ClientMessage.WriteEventsCompleted> writeDispatcher,
     ProjectionConfig projectionConfig, string name, PositionTagger positionTagger,
     ProjectionNamesBuilder namingBuilder, IResultEmitter resultEmitter, bool useCheckpoints,
     bool emitPartitionCheckpoints = false)
     : base(
         publisher, projectionCorrelationId, projectionConfig, name, positionTagger, namingBuilder, resultEmitter,
         useCheckpoints, emitPartitionCheckpoints)
 {
     if (readDispatcher == null) throw new ArgumentNullException("readDispatcher");
     if (writeDispatcher == null) throw new ArgumentNullException("writeDispatcher");
     _projectionVersion = projectionVersion;
     _runAs = runAs;
     _readDispatcher = readDispatcher;
     _writeDispatcher = writeDispatcher;
     _positionTagger = positionTagger;
     _projectionCheckpointStreamId = namingBuilder.MakeCheckpointStreamName();
     _zeroTag = positionTagger.MakeZeroCheckpointTag();
 }