protected override bool IsValidPath(string path)
        {
            log.Trace().Message($"{nameof(IsValidPath)}({nameof(path)}={path})").Write();

            TreesorNodePath parsedPath;

            return(TreesorNodePath.TryParse(path, out parsedPath));
        }
示例#2
0
        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
        }
示例#3
0
        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));
        }