public List <string> GetProjects() { ProfileTimer timer = new ProfileTimer("GetProjects"); List <string> projects = new List <string>(); Log.WriteLine("GetProjects ---------"); try { if (this.m_DTE.Solution != null) { foreach (Project project in this.m_DTE.Solution.Projects) { try { DTE.GetProjects(project, projects); } catch (Exception arg_55_0) { Utils.LogExceptionQuiet(arg_55_0); } } } } catch (Exception arg_7C_0) { Utils.LogExceptionQuiet(arg_7C_0); } timer.Stop(); return(projects); }
private void Execute(AsyncTask.Context context) { ProfileTimer timer = new ProfileTimer("GetOpenFilesEvent"); Set <string> ext_to_scan = (Set <string>)context.Arg; List <string> m_OpenFiles = new List <string>(); List <UnsavedDocument> m_UnsavedDocuments = new List <UnsavedDocument>(); List <Document> documents = new List <Document>(); ProfileTimer get_documents_timer = new ProfileTimer("GetDocuments"); try { foreach (Document document in this.m_DTE.Documents) { documents.Add(document); } } catch (Exception arg_83_0) { Utils.LogExceptionQuiet(arg_83_0); } get_documents_timer.Stop(); foreach (Document document2 in documents) { try { string fullname = document2.FullName; string ext = Path.GetExtension(fullname).ToLower(); if (ext_to_scan.Contains(ext)) { m_OpenFiles.Add(fullname); if (!document2.Saved) { m_UnsavedDocuments.Add(new UnsavedDocument(document2)); } } } catch (Exception arg_E6_0) { Utils.LogExceptionQuiet(arg_E6_0); } if (context.Cancelled) { break; } } timer.Stop(); if (!context.Cancelled && this.Finished != null) { this.Finished(m_OpenFiles, m_UnsavedDocuments); } }