public SingleCommandRunner(Analyzer analyzer, Processor processor, Sniffer sniffer, string[] args)
        {
            _sniffer   = sniffer;
            _analyzer  = analyzer;
            _processor = processor;
            _files     = new List <string>();

            _hashes         = new HashSet <PcapAnalyzer.NetworkHash>();
            _connections    = new HashSet <PcapAnalyzer.NetworkConnection>();
            _passwords      = new HashSet <NetworkPassword>();
            _extractedFiles = new HashSet <NetworkFile>();
            _voipCalls      = new HashSet <CommonUi.VoipCall>();
            _dnsMappings    = new HashSet <PcapAnalyzer.DnsNameMapping>();


            _analyzer.ParsedItemDetected           += OnParsedItemDetected;
            _analyzer.UpdatedItemProprertyDetected += UpdatedPropertyInItemDetected;

            _processor.ProcessingFinished          += (s, e) => this.ExportResults();
            _processor.FileProcessingStatusChanged += (s, e) => this.PrintFileStatusUpdate(s, e);

            // This is done to catch Ctrl + C key press by the user.
            Console.CancelKeyPress += (s, e) => { this.ExportResults(); Environment.Exit(0); };

            // Parse user arguments.
            CommandLine.Parser.Default.ParseArguments <SingleCommandFlags>(args).WithParsed <SingleCommandFlags>((cliFlags) => _cliFlags = cliFlags);
        }
        public SingleCommandRunner(Analyzer analyzer, Processor processor, string[] args)
        {
            _analyzer  = analyzer;
            _processor = processor;
            _files     = new List <string>();

            _hashes         = new HashSet <NetworkHash>();
            _connections    = new HashSet <PcapAnalyzer.NetworkConnection>();
            _passwords      = new HashSet <NetworkPassword>();
            _extractedFiles = new HashSet <NetworkFile>();

            _analyzer.ParsedItemDetected           += OnParsedItemDetected;
            _processor.ProcessingFinished          += (s, e) => this.ExportResults();
            _processor.FileProcessingStatusChanged += (s, e) => this.PrintFileStatusUpdate(s, e);

            // Parse user arguments.
            CommandLine.Parser.Default.ParseArguments <SingleCommandFlags>(args).WithParsed <SingleCommandFlags>((cliFlags) => _cliFlags = cliFlags);
        }