protected override bool GenerateMessage()
        {
            try
            {
                var dcbSlice = new DcbSlice
                {
                    FirstDocument = currentDocumentNumber,
                    DcbCredentials = DcbCredentials,
                    ImageSetId = ImageSetId
                };

                var currentBatchSize = BatchSize;
                var documentsRemaining = numberOfDocumentsInDcb - currentDocumentNumber;
                if (documentsRemaining < BatchSize)
                {
                    currentBatchSize = documentsRemaining;
                }
                dcbSlice.NumberOfDocuments = currentBatchSize;
                currentDocumentNumber += currentBatchSize;

                Send(dcbSlice);

                if (currentDocumentNumber >= numberOfDocumentsInDcb)
                {
                    CreateDatabaseLevelTags();
                    return true;
                }
                LogMessage(true, "DCB documents sliced successfully");
                return false;
            }
            catch (ArgumentOutOfRangeException exRange)
            {
                Tracer.Debug("DcbParser: Opening unsecured DCB database {0}", exRange.Message);
                LogMessage(false, "DcbParser failed to process document. Error: " + Constants.ExportPathFull);
                throw;
            }
            catch (Exception ex)
            {
                LogMessage(false, "DcbSlicer failed to process document. Error: " + ex.Message);
                throw;
            }
        }
 private void Send(DcbSlice dcbSlice)
 {
     var message = new PipeMessageEnvelope
     {
         Body = dcbSlice
     };
     OutputDataPipe.Send(message);
     IncreaseProcessedDocumentsCount(dcbSlice.NumberOfDocuments);
 }