Beispiel #1
0
        public IEnumerable <string> EnumerateFiles()
        {
            IDiagnosticService target = fileSearchService as IDiagnosticService;

            if (target == null)
            {
                return(Enumerable.Empty <string>());
            }

            return(target.EnumerateFiles());
        }
Beispiel #2
0
        public override void Execute()
        {
            if (CanExecute())
            {
                string content = String.Join(Environment.NewLine, searchDiagnostics.EnumerateFiles());
                if (String.IsNullOrEmpty(content))
                {
                    MessageBox.Show("No files available.");
                    return;
                }

                string temp = Path.GetTempFileName();
                File.WriteAllText(temp, content);
                Process.Start(temp);
            }
        }