private string FindInSpecifiedIncludeEntries(string aFileName, SymIncludeDefinition.TType aType) { string ret = string.Empty; // IDictionaryEnumerator enumerator = iIncludes.GetEnumerator(); while (enumerator.MoveNext()) { SymIncludeDefinition include = (SymIncludeDefinition)enumerator.Value; // if (include.Type == aType) { string includePath = include.Location; string resolvedFileName = SymFileSystemUtils.MergePaths(includePath, aFileName); // if (SymFileSystemUtils.FileExists(resolvedFileName)) { ret = resolvedFileName; break; } } } // return(ret); }
public string ResolveFileName(SymIncludeDefinition aDefinition) { // First check against the specified type for an exact match... string location = aDefinition.Location; string ret = FindInSpecifiedIncludeEntries(location, aDefinition.Type); if (ret == string.Empty) { // Try the other remaining type SymIncludeDefinition.TType type = SymIncludeDefinition.TType.ETypeUser; if (aDefinition.Type == SymIncludeDefinition.TType.ETypeUser) { type = SymIncludeDefinition.TType.ETypeSystem; } else { type = SymIncludeDefinition.TType.ETypeUser; } ret = FindInSpecifiedIncludeEntries(location, type); } // return(ret); }