19 using System.Collections.Generic;
33 #region Public properties 39 public string Summary {
get {
return ReleaseInfo.Summary; } }
41 public Uri DownloadUri {
get {
return ReleaseInfo.DownloadUri; } }
43 public string ExpectedHash {
get {
return ReleaseInfo.ExpectedHash; } }
45 public string RawReleaseInfo {
get {
return ReleaseInfo.RawReleaseInfo; } }
47 public ReleaseInfoStatus Status {
get {
return ReleaseInfo.Status; } }
49 public override Exception Exception {
get {
return ReleaseInfo.Exception; } }
59 if (_checkForUpdateCommand == null)
62 (param) => StartProcess());
64 return _checkForUpdateCommand;
76 if (_updateAvailableMessage == null)
80 return _updateAvailableMessage;
88 if (_noUpdateAvailableMessage == null)
92 return _noUpdateAvailableMessage;
100 if (_exceptionMessage == null)
104 return _exceptionMessage;
119 CurrentVersion = currentVersion;
124 #region Implementation and overrides of ProcessViewModelBase 128 processMessageContent.IsIndeterminate =
true;
135 case ReleaseInfoStatus.InfoAvailable:
137 if (ReleaseVersion > CurrentVersion)
139 Logger.Info(
"SendProcessFinishedMessage: update available, {0} > {1}",
140 ReleaseVersion.ToString(), CurrentVersion.ToString());
145 Logger.Info(
"SendProcessFinishedMessage: no update available, {0} <= {1}",
146 ReleaseVersion.ToString(), CurrentVersion.ToString());
150 case ReleaseInfoStatus.FailureToFetch:
151 case ReleaseInfoStatus.FailureToParse:
152 Logger.Warn(
"SendProcessFinishedMessage: Exception occurred!");
161 base.SendProcessFinishedMessage();
166 #region Protected properties 189 private static NLog.Logger Logger {
get {
return _logger.Value; } }
191 private static readonly Lazy<
NLog.Logger> _logger =
new Lazy<
NLog.Logger>(() =>
NLog.LogManager.GetCurrentClassLogger());
Holds information about percent completion of a process and defines events that occur when the proces...
Command that implements ICommand and accepts delegates that contain the command implementation.
Abstract base class for view models that deal with processes.
A view model for the IReleaseInfo interface; i.e.
Interface for classes that fetch current release information.
Exception Exception
If something in the process went wrong, this will be the corresponding exception. ...
override void UpdateProcessMessageContent(ProcessMessageContent processMessageContent)
Updates the given ProcessMessageContent with the current process.
Class that handles semantic versioning.
Fetches and digests release information.
override void SendProcessFinishedMessage()
Sends the ProcessMessageContent.CompletedMessage to signal that the process has finished.