Exemplo n.º 1
0
 public FullPathName(string path)
 {
     if (!PathHelpers.IsAbsolutePath(path))
     {
         ThrowInvalidPath(path);
     }
     _path = path;
 }
Exemplo n.º 2
0
        public RelativePathName(string relativeName, string name)
        {
            if (relativeName == null)
            {
                throw new ArgumentNullException("relativeName");
            }

            if (name == null)
            {
                throw new ArgumentNullException("name");
            }

            if (PathHelpers.IsAbsolutePath(relativeName))
            {
                throw new ArgumentException("Path must be relative.", "relativeName");
            }

            _relativeName = relativeName;
            _name         = name;
        }