public PathWrapper(string path) { if (string.IsNullOrEmpty(path)) { return; } current = new PathDecorator(path); }
public bool Next() { if (current == null) { return(false); } current = current.EnterNextPathPoint(); if (current == null) { return(false); } return(true); }
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; } }