public Query Get(string queryString) { if (!indexFinishedPopulating) { string message = "Index is being rebuilt... " + string.Format("{0:0%}", progress); if (loadErrorMessage != null) { message = message + "<br />" + loadErrorMessage; } return(Query.Empty(message)); } if (queryString.Length < 3) { return(Query.Empty("Enter at least three characters for type or member name")); } var query = new Query(queryString); if (query.IsAssemblySearch()) { FindAssemblies(query, defaultToAll: true); } else if (query.SymbolKinds.Contains(SymbolKindText.MSBuildProperty)) { FindMSBuildProperties(query, defaultToAll: true); } else if (query.SymbolKinds.Contains(SymbolKindText.MSBuildItem)) { FindMSBuildItems(query, defaultToAll: true); } else if (query.SymbolKinds.Contains(SymbolKindText.MSBuildTarget)) { FindMSBuildTargets(query, defaultToAll: true); } else if (query.SymbolKinds.Contains(SymbolKindText.MSBuildTask)) { FindMSBuildTasks(query, defaultToAll: true); } else { FindSymbols(query); FindAssemblies(query); FindProjects(query); FindGuids(query); FindMSBuildProperties(query); FindMSBuildItems(query); FindMSBuildTargets(query); FindMSBuildTasks(query); } return(query); }
public Query Get(string queryString) { if (!indexFinishedPopulating) { string message = "Index is being rebuilt... " + string.Format("{0:0%}", progress); if (loadErrorMessage != null) { message = message + "<br />" + loadErrorMessage; } return Query.Empty(message); } if (queryString.Length < 3) { return Query.Empty("Enter at least three characters for type or member name"); } var query = new Query(queryString); if (query.IsAssemblySearch()) { FindAssemblies(query, defaultToAll: true); } else if (query.SymbolKinds.Contains(SymbolKindText.MSBuildProperty)) { FindMSBuildProperties(query, defaultToAll: true); } else if (query.SymbolKinds.Contains(SymbolKindText.MSBuildItem)) { FindMSBuildItems(query, defaultToAll: true); } else if (query.SymbolKinds.Contains(SymbolKindText.MSBuildTarget)) { FindMSBuildTargets(query, defaultToAll: true); } else if (query.SymbolKinds.Contains(SymbolKindText.MSBuildTask)) { FindMSBuildTasks(query, defaultToAll: true); } else { FindSymbols(query); FindAssemblies(query); FindProjects(query); FindGuids(query); FindMSBuildProperties(query); FindMSBuildItems(query); FindMSBuildTargets(query); FindMSBuildTasks(query); } return query; }
public Query Get(string queryString) { if (System.Web.HttpContext.Current != null) { var trace = System.Web.HttpContext.Current.Trace; trace.Write("index RootPath=" + (RootPath ?? "-")); trace.Write("index ProjPath=" + (ProjPath ?? "-")); } if (ProjPath == null) { RootPath = SourceConfig.GetRootPath ?? RootPath; ProjPath = ""; } if (!indexFinishedPopulating) { var rootPath = Path.Combine(RootPath, ProjPath); if (Directory.Exists(rootPath)) IndexLoader.ReadIndex(this, rootPath); } if (!indexFinishedPopulating) { string message = "Index is being rebuilt... " + string.Format("{0:0%}", progress); if (queryString.Contains(@"\") || queryString.Contains("/")) { var ctx = System.Web.HttpContext.Current; var dir = Path.Combine(RootPath, queryString); if (Directory.Exists(dir)) { message = "#" + queryString + "SolutionExplorer.html"; ctx.Response.Redirect(message); return Query.Empty(message); } } if (loadErrorMessage != null) { message = message + "<br />" + loadErrorMessage; } return Query.Empty(message); } if (queryString.Length < 3) { return Query.Empty("Enter at least three characters for type or member name"); } var query = new Query(queryString); if (query.IsAssemblySearch()) { FindAssemblies(query, defaultToAll: true); } else if (query.SymbolKinds.Contains(SymbolKindText.MSBuildProperty)) { FindMSBuildProperties(query, defaultToAll: true); } else if (query.SymbolKinds.Contains(SymbolKindText.MSBuildItem)) { FindMSBuildItems(query, defaultToAll: true); } else if (query.SymbolKinds.Contains(SymbolKindText.MSBuildTarget)) { FindMSBuildTargets(query, defaultToAll: true); } else if (query.SymbolKinds.Contains(SymbolKindText.MSBuildTask)) { FindMSBuildTasks(query, defaultToAll: true); } else { FindSymbols(query); FindAssemblies(query); FindProjects(query); FindGuids(query); FindMSBuildProperties(query); FindMSBuildItems(query); FindMSBuildTargets(query); FindMSBuildTasks(query); } return query; }