Beispiel #1
0
        /// <summary>
        /// Removes all references to remote paths.  This insures that network issues don't cause grief.
        /// </summary>
        public SymbolPath LocalOnly()
        {
            var ret = new SymbolPath();

            foreach (var elem in Elements)
            {
                ret.Add(elem.LocalOnly());
            }
            return(ret);
        }
Beispiel #2
0
        /// <summary>
        /// People can use symbol servers without a local cache.  This is bad, add one if necessary.
        /// </summary>
        public SymbolPath InsureHasCache(string defaultCachePath)
        {
            var ret = new SymbolPath();

            foreach (var elem in Elements)
            {
                ret.Add(elem.InsureHasCache(defaultCachePath));
            }
            return(ret);
        }
Beispiel #3
0
        /// <summary>
        /// This 'cleans up' a symbol path.  In particular
        /// Empty ones are replaced with good defaults (symweb or msdl)
        /// All symbol server specs have local caches (%Temp%\symbols if nothing else is specified).
        ///
        /// Note that this routine does NOT update _NT_SYMBOL_PATH.
        /// </summary>
        internal static SymbolPath CleanSymbolPath()
        {
            string symPathStr = SymbolPathFromEnvironment;

            if (symPathStr.Length == 0)
            {
                symPathStr = MicrosoftSymbolServerPath;
            }
            var symPath = new SymbolPath(symPathStr);

            return(symPath.InsureHasCache(symPath.DefaultSymbolCache()).CacheFirst());
        }
Beispiel #4
0
        /// <summary>
        /// Create a new symbol path which first search all machine local locations (either explicit location or symbol server cache locations)
        /// followed by all non-local symbol server.   This produces better behavior (If you can find it locally it will be fast)
        /// </summary>
        public SymbolPath CacheFirst()
        {
            var ret = new SymbolPath();

            foreach (var elem in Elements)
            {
                if (elem.IsSymServer && elem.IsRemote)
                {
                    continue;
                }
                ret.Add(elem);
            }
            foreach (var elem in Elements)
            {
                if (elem.IsSymServer && elem.IsRemote)
                {
                    ret.Add(elem);
                }
            }
            return(ret);
        }