public IEnumerable <string> EnumerateFiles() { IDiagnosticService target = fileSearchService as IDiagnosticService; if (target == null) { return(Enumerable.Empty <string>()); } return(target.EnumerateFiles()); }
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); } }