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); }
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); }
public static void ContentDownloaderConfigSetInstallDirectory(string installDirectory) => InstallDirectoryProperty.SetValue(ConfigField.GetValue(null), installDirectory);
public static void ContentDownloaderConfigSetUsingFileList(bool usingFileList) => UsingFileListProperty.SetValue(ConfigField.GetValue(null), usingFileList);
public static void ContentDownloaderConfigSetMaxDownloads(int maxDownloads) => MaxDownloadsProperty.SetValue(ConfigField.GetValue(null), maxDownloads);