MCPcopy Create free account
hub / github.com/Squirrel/Squirrel.Windows / UpdateManager

Method UpdateManager

src/Squirrel/UpdateManager.cs:32–50  ·  view source on GitHub ↗
(string urlOrPath, 
            string applicationName = null,
            string rootDirectory = null,
            IFileDownloader urlDownloader = null)

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 1

getApplicationNameMethod · 0.80

Tested by

no test coverage detected