Example #1
0
        public string GetPathAsString()
        {
            Stack <PathAtom> copy = new Stack <PathAtom>(path);

            copy = GenericStack <PathAtom> .InvertStack(path);

            StringBuilder result = new StringBuilder("");

            while (copy.Count != 0)
            {
                result.Append(copy.Pop().ToString() + " -> ");
            }
            return(result.ToString());
        }
Example #2
0
        public XElement GetPathAsElement()
        {
            Stack <PathAtom> copy = new Stack <PathAtom>(path);

            copy = GenericStack <PathAtom> .InvertStack(path);

            XElement result = new XElement(copy.Pop().GetAtom());
            XElement child  = result;

            while (copy.Count > 0)
            {
                child.Add(copy.Pop().GetAtom());
                child = child.Descendants().First();
            }

            return(result);
        }
Example #3
0
 public void InvertIt()
 {
     path = GenericStack <PathAtom> .InvertStack(path);
 }