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()); } }
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); }