private void AfterExportData(AfterExportDataEventArgs e)
        {
            var infoMessage = $"[{DateTime.Now}] Total events exported: {_totalRows}                        ";

            _logger.LogInformation(infoMessage);
            Console.WriteLine(infoMessage);

            infoMessage = $"[{DateTime.Now}] Last portion {_lastPortionRows}                                     ";
            _logger.LogInformation(infoMessage);
            Console.WriteLine(infoMessage);

            infoMessage = $"[{DateTime.Now}] Last event period: {e.CurrentPosition.EventPeriod}                ";
            _logger.LogInformation(infoMessage);
            Console.WriteLine(infoMessage);

            infoMessage = $"[{DateTime.Now}] Last event ID: {e.CurrentPosition.EventUUID}                ";
            _logger.LogInformation(infoMessage);
            Console.WriteLine(infoMessage);

            infoMessage = $"[{DateTime.Now}] File: {e.CurrentPosition.CurrentFileData}                ";
            _logger.LogInformation(infoMessage);
            Console.WriteLine(infoMessage);

            Console.WriteLine();
            Console.WriteLine();
            if (_settings.AllowInteractiveActions)
            {
                Console.WriteLine("Press 'CTRL + C' to cancel export operation...");
            }
            else
            {
                Console.WriteLine();
            }
        }
Beispiel #2
0
        private static void AfterExportData(AfterExportDataEventArgs e)
        {
            _endPortionExport = DateTime.Now;
            var duration = _endPortionExport - _beginPortionExport;

            Console.WriteLine("[{0}] Total read: {1}            ", DateTime.Now, _totalRows);
            Console.WriteLine("[{0}] {1} / {2} (sec.)           ", DateTime.Now, _lastPortionRows, duration.TotalSeconds);
            Console.WriteLine();
            Console.WriteLine();
            Console.WriteLine("Нажмите 'q' для завершения отслеживания изменений...");

            _beginPortionExport = DateTime.Now;
        }
 private static void AfterExportData(AfterExportDataEventArgs e)
 {
 }