public void Start() { IsRunning = true; FileInfo[] fi = null; while (IsRunning) { try { if (_processedFilesPath != "") { CaptureFileData cfd = new CaptureFileData(); DirectoryInfo di = new DirectoryInfo(_processedFilesPath); fi = di.GetFiles("*.pcap"); if (fi.Length > 0) { foreach (var file in fi) { if (!updatedFiles.ContainsKey(file.Name)) { int batchId = cfd.GetBatchId(file.Name); if (batchId > 0) { cfd.UpdateCaptureBatchParseStatus(batchId); updatedFiles.Add(file.Name, batchId); } } } } } else { Thread.Sleep(3000); } } catch (Exception ex) { // Ignore file not found errors //throw new Exception("ParsedFileNotifier unable to find parsed pcap files: " + ex.Message); } } }
private void UpdateCaptureBatchParseStatusForRecalculation(int captureBatchId) { CaptureFileData cfd = new CaptureFileData(); cfd.UpdateCaptureBatchParseStatus(captureBatchId); }
private void UpdateCaptureBatchParseStatus() { CaptureFileData cfd = new CaptureFileData(); cfd.UpdateCaptureBatchParseStatus(_CurrentCaptureBatchId); }