예제 #1
0
        protected AbstractDownloadsDirectory(
            string path,
            DirectorySeparatorChars directorySeparatorChars)
        {
            if (string.IsNullOrWhiteSpace(path))
            {
                throw new ArgumentException("Value cannot be null or whitespace.", nameof(path));
            }

            var(dirSeparator, altDirSeparator) = directorySeparatorChars;
            _path =
                path
                .TrimEnd(dirSeparator)
                .TrimEnd(altDirSeparator)
                + dirSeparator;
        }
예제 #2
0
 public CompletedDownloadsDirectory(
     DownloadDirectoriesOptions options,
     DirectorySeparatorChars directorySeparatorChars)
     : base(options.Completed, directorySeparatorChars)
 {
 }
예제 #3
0
 public IncompleteDownloadsDirectory(
     DownloadDirectoriesOptions options,
     DirectorySeparatorChars directorySeparatorChars)
     : base(options.Incomplete, directorySeparatorChars)
 {
 }