Example #1
0
 public PathWrapper(string path)
 {
     if (string.IsNullOrEmpty(path))
     {
         return;
     }
     current = new PathDecorator(path);
 }
Example #2
0
            public bool Next()
            {
                if (current == null)
                {
                    return(false);
                }

                current = current.EnterNextPathPoint();
                if (current == null)
                {
                    return(false);
                }

                return(true);
            }
Example #3
0
 public PathDecorator(string path)
 {
     if (string.IsNullOrEmpty(path))
     {
         return;
     }
     childWrapper  = null;
     this.fullPath = path;
     if (path.Contains("."))
     {
         int index = path.IndexOf('.');
         currentPathPoint = path.Substring(0, index);
         string nextPath = path.Substring(index + 1, path.Length - index - 1);
         childWrapper = new PathDecorator(nextPath);
     }
     else
     {
         currentPathPoint = path;
         childWrapper     = null;
     }
 }