/// <summary>
        /// See <c>IScanner</c> documentation.
        /// </summary>
        public IMultiFileScanResult Scan(IEnumerable <string> filePaths, IEnumerable <ITermTable> termTables, FileScanCompleted callback, FileContentGetter contentGetter, ScanStopper stopper)
        {
            if (filePaths == null)
            {
                throw new ArgumentNullException("filePaths");
            }
            if (termTables == null)
            {
                throw new ArgumentNullException("termTables");
            }

            MatchFinder finder = new MatchFinder(termTables);

            MultiFileScanResult allResults = new MultiFileScanResult();

            foreach (string filePath in filePaths)
            {
                if (stopper != null && stopper())
                {
                    break;
                }

                if (FileShouldBeScanned(filePath))
                {
                    IScanResult fileResult = ScanFile(filePath, finder, contentGetter, stopper);
                    allResults.Append(fileResult);
                    if (callback != null)
                    {
                        callback(fileResult);
                    }
                }
            }

            return(allResults);
        }
        /// <summary>
        /// See <c>IScanner</c> documentation.
        /// </summary>
        public IMultiFileScanResult Scan(IEnumerable<string> filePaths, IEnumerable<ITermTable> termTables, FileScanCompleted callback, FileContentGetter contentGetter, ScanStopper stopper)
        {
            if (filePaths == null)
            {
                throw new ArgumentNullException("filePaths");
            }
            if (termTables == null)
            {
                throw new ArgumentNullException("termTables");
            }

            MatchFinder finder = new MatchFinder(termTables);

            MultiFileScanResult allResults = new MultiFileScanResult();

            foreach (string filePath in filePaths)
            {
                if (stopper != null && stopper())
                {
                    break;
                }

                if (FileShouldBeScanned(filePath))
                {
                    IScanResult fileResult = ScanFile(filePath, finder, contentGetter, stopper);
                    allResults.Append(fileResult);
                    if (callback != null)
                    {
                        callback(fileResult);
                    }
                }
            }

            return allResults;
        }