From 715e93985ddd8640d0993a632667baf514691294 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Holger=20B=C3=B6rchers?= Date: Thu, 22 Mar 2018 08:16:17 +0100 Subject: [PATCH] Added comments. --- Katteker/UpdateManager.cs | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Katteker/UpdateManager.cs b/Katteker/UpdateManager.cs index deef65e..2a4f9eb 100644 --- a/Katteker/UpdateManager.cs +++ b/Katteker/UpdateManager.cs @@ -10,6 +10,9 @@ using System.Threading.Tasks; namespace Katteker { + /// + /// Update manager, which handles the updates. + /// public class UpdateManager { private static readonly string _baseDir = AppDomain.CurrentDomain.BaseDirectory; @@ -40,6 +43,13 @@ namespace Katteker /// public string UrlOrPath => _urlOrPath; + /// + /// Create the update manager. + /// + /// path to the publishing directory + /// name of the application to update. + /// root directory. + /// the update manager. public static UpdateManager Create(string urlOrPath = null, string applicationName = null, string rootDirectory = null) { _config = ReadConfigFile(); @@ -49,6 +59,14 @@ namespace Katteker return new UpdateManager(urlOrPath, appName, rootAppDirectory); } + /// + /// Try to create the update manager. + /// + /// update manager + /// path to the publishing directory + /// name of the application to update. + /// root directory. + /// true if the creation success, false otherwise. public static bool TryCreate(out UpdateManager manager, string urlOrPath = null, string applicationName = null, string rootDirectory = null) { try @@ -69,6 +87,11 @@ namespace Katteker return updateInfo.ReleasesToApply; } + /// + /// Restart the application. + /// + /// + /// public void RestartApp(string exeToStart = null, string arguments = null) { exeToStart = exeToStart ?? Path.GetFileName(Assembly.GetEntryAssembly().Location); @@ -81,6 +104,11 @@ namespace Katteker } } + /// + /// Update application. + /// + /// The updating process. + /// public async Task UpdateAppAsync(IProgress progress = null) { progress?.Report(0);