示例#1
0
        public void ScriptSymbolPathDefault()
        {
            StackHashSearchPath symbolPath = StackHashSearchPath.DefaultSymbolPath;

            Assert.AreEqual(1, symbolPath.Count);
            Assert.AreEqual(true, symbolPath[0].Contains(@"SRV*"));
            Assert.AreEqual(true, symbolPath[0].Contains(@"http://msdl.microsoft.com/download/symbols"));
        }
示例#2
0
        public static StackHashSearchPath StringToSearchPath(string s)
        {
            StackHashSearchPath searchPath = new StackHashSearchPath();

            if (!string.IsNullOrEmpty(s))
            {
                string[] pathElements = s.Split(new char[] { SearchPathSeparator }, StringSplitOptions.RemoveEmptyEntries);
                foreach (string element in pathElements)
                {
                    searchPath.Add(element);
                }
            }

            return(searchPath);
        }
示例#3
0
        public void ScriptSymbolPathGetFullMultipleEntries()
        {
            StackHashSearchPath symbolPath = new StackHashSearchPath();

            symbolPath.Add("c:\\path1");
            symbolPath.Add("c:\\path2");
            symbolPath.Add("c:\\path3");
            symbolPath.Add("c:\\path4");

            String fullPath = symbolPath.FullPath;

            String[] pathElements = fullPath.Split(new char [] { ';' });

            for (int i = 0; i < pathElements.Length - 1; i++)
            {
                Assert.AreEqual(pathElements[i], "c:\\path" + (i + 1).ToString());
            }
        }
示例#4
0
        public static string SearchPathToString(StackHashSearchPath searchPath)
        {
            string s = string.Empty;

            if ((searchPath != null) && (searchPath.Count > 0))
            {
                StringBuilder sb = new StringBuilder();

                for (int i = 0; i < searchPath.Count; i++)
                {
                    sb.Append(searchPath[i]);

                    if (i < (searchPath.Count - 1))
                    {
                        sb.Append(SearchPathSeparator);
                    }
                }

                s = sb.ToString();
            }

            return(s);
        }
示例#5
0
        public void ScriptSymbolPathConstructor()
        {
            StackHashSearchPath symbolPath = new StackHashSearchPath();

            Assert.AreEqual(0, symbolPath.Count);
        }