Example #1
0
        public virtual DirectoryPath RelativeTo(DirectoryPath directoryPath)
        {
            if (directoryPath == null) throw new ArgumentNullException("directoryPath");
            if (IsRelative == false)
                throw new InvalidOperationException("DirectoryPath is not relative.");

            var newpath = System.IO.Path.Combine(directoryPath.ToString(), _path);
            return new DirectoryPath(newpath);
        }
Example #2
0
 public bool Equals(DirectoryPath other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return Equals(other._path, _path);
 }