コード例 #1
0
ファイル: MainWindow.cs プロジェクト: kzemek/FileScanner
        internal void GenerateSearchSummary(List <MatchingFile> searchResults, ISearchResult result)
        {
            var inputPaths       = from p in result.Searchees select p.Searchee.Path;
            var summaryGenerator = SummaryGeneratorFactory.Create();
            var searchQuery      = string.Join(" ", result.Phrases);

            summaryGenerator.Generate(searchQuery, inputPaths, searchResults);
        }
コード例 #2
0
        private void GenerateSearchSummary(List <MatchingFile> searchResults)
        {
            var inputPaths = new List <string> {
                _searchFile
            };
            var summaryGenerator = SummaryGeneratorFactory.Create();

            summaryGenerator.Generate(_searchPhrase, inputPaths, searchResults);
        }
コード例 #3
0
        /// <summary>
        /// This test is not fully automatic - it requires pressing the "OK" button, so the
        /// TestMethod annotation is commented out.
        ///
        /// It is here to show how the SearchSummary module should be used by external modules.
        /// </summary>
        //[TestMethod]
        public void Manual_Generate()
        {
            ISummaryGenerator generator = SummaryGeneratorFactory.Create();

            generator.Generate(searchQuery, inputPaths, matchingFiles);
        }