Exemplo n.º 1
0
        public void VisitRelativeRoot(RelativeRoot node, GlobVisitorContext context)
        {
            // Push each path to the context.
            var pushedSegmentCount = 0;
            var path = context.Environment.WorkingDirectory;

            foreach (var segment in path.Segments)
            {
                context.Push(segment);
                pushedSegmentCount++;
            }

            node.Next.Accept(this, context);

            // Pop all segments we added to the context.
            for (var index = 0; index < pushedSegmentCount; index++)
            {
                context.Pop();
            }
        }
Exemplo n.º 2
0
 public void VisitRelativeRoot(RelativeRoot node, GlobVisitorContext context)
 {
     context.Push(context.Environment.WorkingDirectory.FullPath);
     node.Next.Accept(this, context);
     context.Pop();
 }