Exemplo n.º 1
0
        private async Task SendDataCurrentPortion(ExtendedEventsReader reader)
        {
            RiseBeforeExportData(out var cancel);
            if (!cancel)
            {
                await _target.Save(_dataToSend);

                RiseAfterExportData(reader.GetCurrentPosition());
                if (reader.CurrentFile != null)
                {
                    await _target.SaveLogPosition(reader.GetCurrentPosition());
                }
            }
            _dataToSend.Clear();
        }
Exemplo n.º 2
0
        private void ExtendedEventsReader_AfterReadFile(ExtendedEventsReader sender, AfterReadFileEventArgs args)
        {
            if (_dataToSend.Count > 0)
            {
                SendDataCurrentPortion(sender).Wait();
            }

            ExtendedEventsPosition position = sender.GetCurrentPosition();

            _target.SaveLogPosition(position);
        }
Exemplo n.º 3
0
        private void ExtendedEventsReader_AfterReadFile(ExtendedEventsReader sender, AfterReadFileEventArgs args)
        {
            FileInfo _lastEventLogDataFileInfo = new FileInfo(args.FileName);

            if (_dataToSend.Count > 0)
            {
                SendDataCurrentPortion(sender).Wait();
            }

            ExtendedEventsPosition position = sender.GetCurrentPosition();

            _target.SaveLogPosition(_lastEventLogDataFileInfo, position, true);
        }