Ejemplo n.º 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());
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
0
 public void InvertIt()
 {
     path = GenericStack <PathAtom> .InvertStack(path);
 }