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);
        }
        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 void Add(SymIncludeDefinition aDefinition)
        {
            string location = aDefinition.Location;

            if (location == String.Empty)
            {
                throw new ArgumentException("Include location cannot be null when adding to include directory", aDefinition.ToString());
            }

            if (iIncludes[location] == null)
            {
                iIncludes.Add(location, aDefinition);
            }
        }