protected override bool IsValidPath(string path) { log.Trace().Message($"{nameof(IsValidPath)}({nameof(path)}={path})").Write(); TreesorNodePath parsedPath; return(TreesorNodePath.TryParse(path, out parsedPath)); }
public static bool TryParse(string drivePath, out TreesorNodePath parsedPath) { if (string.IsNullOrEmpty(drivePath)) { parsedPath = RootPath; } parsedPath = new TreesorNodePath(Elementary.Hierarchy.HierarchyPath.Parse(drivePath, @"\/")); return(true); // currently no error cases are implemented }
public override bool Equals(object other) { TreesorNodePath otherAsNodePath = other as TreesorNodePath; if (otherAsNodePath == null) { return(false); // wrong type } if (object.ReferenceEquals(this, other)) { return(true); // instances are same } return(this.HierarchyPath.Equals(otherAsNodePath.HierarchyPath)); }