protected override void BeginWriteCheckpoint( CheckpointTag requestedCheckpointPosition, string requestedCheckpointState) { _requestedCheckpointPosition = requestedCheckpointPosition; _inCheckpointWriteAttempt = 1; //TODO: pass correct expected version _checkpointEventToBePublished = new Event( Guid.NewGuid(), "$ProjectionCheckpoint", true, requestedCheckpointState == null ? null : Helper.UTF8NoBom.GetBytes(requestedCheckpointState), requestedCheckpointPosition.ToJsonBytes(projectionVersion: _projectionVersion)); PublishWriteCheckpointEvent(); }
public void BeginWriteCheckpoint(IEnvelope envelope, CheckpointTag requestedCheckpointPosition, string requestedCheckpointState) { _envelope = envelope; _requestedCheckpointPosition = requestedCheckpointPosition; _inCheckpointWriteAttempt = 1; //TODO: pass correct expected version _checkpointEventToBePublished = new Event( Guid.NewGuid(), ProjectionEventTypes.ProjectionCheckpoint, true, requestedCheckpointState == null ? null : Helper.UTF8NoBom.GetBytes(requestedCheckpointState), requestedCheckpointPosition.ToJsonBytes(projectionVersion: _projectionVersion)); PublishWriteStreamMetadataAndCheckpointEvent(); }