bovender framework
C# framework that implements MVVM and more
Bovender.Versioning.ReleaseInfo Class Reference

Fetches and digests release information. More...

Inheritance diagram for Bovender.Versioning.ReleaseInfo:
Bovender.Mvvm.Models.ProcessModel Bovender.Versioning.IReleaseInfo Bovender.Mvvm.Models.IProcessModel Bovender.UnitTests.Versioning.ReleaseInfoForTesting

Public Member Functions

virtual bool Fetch ()
 Updates the release information. More...
 
override bool Execute ()
 This method may be called by a ProcessViewModelBase-derived class in a worker task that wraps this method in a try...catch structure. More...
 
 ReleaseInfo ()
 Creates a new ReleaseInfo object that can fetch release information from the internet. More...
 
 ReleaseInfo (Uri releaseInfoUri)
 Creates a new ReleaseInfo object that can fetch release information from the internet using the URI given as a parameter. More...
 
- Public Member Functions inherited from Bovender.Mvvm.Models.ProcessModel
void Cancel ()
 Cancels the current process More...
 

Protected Member Functions

override void OnCancelling ()
 
virtual bool Parse (string rawInfo)
 
virtual void SetDefaults ()
 

Properties

Uri ReleaseInfoUri [get, protected set]
 Gets or sets the URI of the release info file. More...
 
SemanticVersion ReleaseVersion [get, protected set]
 
string Summary [get, protected set]
 
Uri DownloadUri [get, protected set]
 
string ExpectedHash [get, protected set]
 
string RawReleaseInfo [get, protected set]
 
ReleaseInfoStatus Status [get, protected set]
 
Exception Exception [get, protected set]
 
- Properties inherited from Bovender.Mvvm.Models.ProcessModel
ProcessModel Dependent [get, set]
 
bool IsCancellationRequested [get, set]
 This property is set to true by the Cancel() method. More...
 
- Properties inherited from Bovender.Versioning.IReleaseInfo
ReleaseInfoStatus Status [get]
 
SemanticVersion ReleaseVersion [get]
 Gets or sets the version of the release. More...
 
string Summary [get]
 Gets or sets the release summary. More...
 
Uri DownloadUri [get]
 Gets or sets the URI for the release download. More...
 
string ExpectedHash [get]
 Gets or sets the expected checksum hash for the binary file. More...
 
string RawReleaseInfo [get]
 Gets or sets the raw, unparsed release information. More...
 
Exception Exception [get]
 

Additional Inherited Members

- Events inherited from Bovender.Mvvm.Models.ProcessModel
EventHandler< ProcessModelEventArgsCancelling
 

Detailed Description

Fetches and digests release information.

Definition at line 32 of file ReleaseInfo.cs.

Constructor & Destructor Documentation

Bovender.Versioning.ReleaseInfo.ReleaseInfo ( )
inline

Creates a new ReleaseInfo object that can fetch release information from the internet.

The ReleaseInfoUri must be set separately.

Definition at line 153 of file ReleaseInfo.cs.

Bovender.Versioning.ReleaseInfo.ReleaseInfo ( Uri  releaseInfoUri)
inline

Creates a new ReleaseInfo object that can fetch release information from the internet using the URI given as a parameter.

Definition at line 159 of file ReleaseInfo.cs.

Member Function Documentation

override bool Bovender.Versioning.ReleaseInfo.Execute ( )
inlinevirtual

This method may be called by a ProcessViewModelBase-derived class in a worker task that wraps this method in a try...catch structure.

The implementation does not need to and should not handle tasks or threads itself.

Returns
True if successful, false if failed or cancelled.

Implements Bovender.Mvvm.Models.ProcessModel.

Definition at line 140 of file ReleaseInfo.cs.

virtual bool Bovender.Versioning.ReleaseInfo.Fetch ( )
inlinevirtual

Updates the release information.

Returns
True if successful, false if not.

Implements Bovender.Versioning.IReleaseInfo.

Reimplemented in Bovender.UnitTests.Versioning.ReleaseInfoForTesting.

Definition at line 74 of file ReleaseInfo.cs.

Property Documentation

Uri Bovender.Versioning.ReleaseInfo.ReleaseInfoUri
getprotected set

Gets or sets the URI of the release info file.

This file must follow a simple, albeit specific format:

Line 1: Current release version; this must follow the semantic versioning scheme (https://semver.org). Line 2: URL for the installer. May contain $VERSION placeholders which will be substituted with the version from line 1. Line 3: Expected checksum of the release installer. This may be a SHA-1, SHA-256 or other checksum hash, depending on the length of the string. Lines 4-n: Release summary.

Definition at line 54 of file ReleaseInfo.cs.


The documentation for this class was generated from the following file: