private bool ProcessInstruction(FileInfo fileInfo)
        {
            var startTime = DateTime.Now;

            _logger.DebugFormat("Starting to process instruction {0}.", fileInfo.FullName);

            var processingResult = false;
            var trialsCount      = 0;

            while (trialsCount < NumberOfTrialsPerSendRequest)
            {
                trialsCount++;
                processingResult = _destinationProcessor.Process(fileInfo);
                if (processingResult)
                {
                    break;
                }
                else
                {
                    _logger.Warn($"Error sending data to destination. Trial {trialsCount} out of {NumberOfTrialsPerSendRequest}");
                }
            }

            if (!processingResult)
            {
                _hasError = true;
                _logger.Error("Error sending data to destination. Moving on to next.");
                return(false);
            }

            _logger.DebugFormat("Completed processing of the {1} Elapsed time is {0}.", (DateTime.Now - startTime).ToString(@"dd\.hh\:mm\:ss"), fileInfo.FullName);

            return(true);
        }
        private bool SendToDestination(OutputInstruction instruction)
        {
            if (!_destinationProcessor.Process(instruction))
            {
                _logger.Info("Error sending data to destination. Moving on to next.");
                _hasError = true;
                return(false);
            }

            return(true);
        }