コード例 #1
0
        public static List <Regex> ContentDownloaderConfigGetFilesToDownloadRegex()
        {
            var config = ConfigField.GetValue(null);

            var filesToDownloadRegex = FilesToDownloadRegexProperty.GetValue(config) as List <Regex>;

            if (filesToDownloadRegex is null)
            {
                filesToDownloadRegex = new List <Regex>();
                FilesToDownloadRegexProperty.SetValue(config, filesToDownloadRegex);
            }

            return(filesToDownloadRegex);
        }
コード例 #2
0
        public static HashSet <string> ContentDownloaderConfigGetFilesToDownload()
        {
            var config = ConfigField.GetValue(null);

            var filesToDownload = FilesToDownloadProperty.GetValue(config) as HashSet <string>;

            if (filesToDownload is null)
            {
                filesToDownload = new HashSet <string>();
                FilesToDownloadProperty.SetValue(config, filesToDownload);
            }

            return(filesToDownload);
        }
コード例 #3
0
 public static void ContentDownloaderConfigSetInstallDirectory(string installDirectory) => InstallDirectoryProperty.SetValue(ConfigField.GetValue(null), installDirectory);
コード例 #4
0
 public static void ContentDownloaderConfigSetUsingFileList(bool usingFileList) => UsingFileListProperty.SetValue(ConfigField.GetValue(null), usingFileList);
コード例 #5
0
 public static void ContentDownloaderConfigSetMaxDownloads(int maxDownloads) => MaxDownloadsProperty.SetValue(ConfigField.GetValue(null), maxDownloads);