Ejemplo n.º 1
0
        /// <summary>
        /// Asynchronously send a single text line (along with target number) to either text file (dispenser) or output consumer
        /// </summary>
        /// <param name="tplToSend"></param>
        /// <returns></returns>
        private async Task SendNextLineAsync(Tuple <ExternalLine, int> tplToSend)
        {
            if (_outputToWriter)
            {
                await _outputFileWriter.SendNextLineAsync(tplToSend);
            }
            else
            {
                await _config.AsyncOutputConsumer(tplToSend, _globalCache);
            }

            if (tplToSend != null)
            {
                _targets[tplToSend.Item2].All++;                  // increment WrittenLinesTotalCnt count
            }
        }