(string urlOrPath,
string applicationName = null,
string rootDirectory = null,
IFileDownloader urlDownloader = null)
| 30 | IDisposable updateLock; |
| 31 | |
| 32 | public UpdateManager(string urlOrPath, |
| 33 | string applicationName = null, |
| 34 | string rootDirectory = null, |
| 35 | IFileDownloader urlDownloader = null) |
| 36 | { |
| 37 | Contract.Requires(!String.IsNullOrEmpty(urlOrPath)); |
| 38 | Contract.Requires(!String.IsNullOrEmpty(applicationName)); |
| 39 | |
| 40 | updateUrlOrPath = urlOrPath; |
| 41 | this.applicationName = applicationName ?? UpdateManager.getApplicationName(); |
| 42 | this.urlDownloader = urlDownloader ?? new FileDownloader(); |
| 43 | |
| 44 | if (rootDirectory != null) { |
| 45 | this.rootAppDirectory = Path.Combine(rootDirectory, this.applicationName); |
| 46 | return; |
| 47 | } |
| 48 | |
| 49 | this.rootAppDirectory = Path.Combine(rootDirectory ?? GetLocalAppDataDirectory(), this.applicationName); |
| 50 | } |
| 51 | |
| 52 | public async Task<UpdateInfo> CheckForUpdate(bool ignoreDeltaUpdates = false, Action<int> progress = null, UpdaterIntention intention = UpdaterIntention.Update) |
| 53 | { |
nothing calls this directly
no test coverage detected