Class SoftwareUpdate
Implements functionality to update the software.
Implements
Namespace: Sartorius.SAF.Infrastructure.SoftwareUpdate
Assembly: Sartorius.SAF.dll
Syntax
[Export(typeof(ISoftwareUpdate))]
public class SoftwareUpdate : ObservableObject, IDataErrorInfo, INotifyDataErrorInfo, INotifyDataPropertyChanged, ISoftwareUpdate, INotifyPropertyChanged
  Constructors
View SourceSoftwareUpdate(IUpdateProvider)
Initializes a new instance of the SoftwareUpdate class.
Declaration
[ImportingConstructor]
public SoftwareUpdate(IUpdateProvider updateProvider)
  Parameters
| Type | Name | Description | 
|---|---|---|
| IUpdateProvider | updateProvider | An implementation of the IUpdateProvider.  | 
      
Properties
View SourceIsEnabled
Gets value indicating whether this instance is enabled.
Declaration
public bool IsEnabled { get; }
  Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
  | 
      
State
Gets the state of this instance.
Declaration
public SoftwareUpdateState State { get; }
  Property Value
| Type | Description | 
|---|---|
| SoftwareUpdateState | 
Methods
View SourceCancelGetUpdateAsync()
Cancels the update get async.
Declaration
public void CancelGetUpdateAsync()
  CheckForUpdateAsync()
Checks if any updates are available async. When the update check has been completed, UpdateCheckCompleted is invoked.
Declaration
public void CheckForUpdateAsync()
  ExecuteUpdate()
Executes the update process.
Declaration
public void ExecuteUpdate()
  GetUpdateAsync()
Gets the update async. If the get progress changes, the System.ComponentModel.ProgressChangedEventHandler is invoked. If the get has been completed, the System.ComponentModel.AsyncCompletedEventHandler is invoked.
Declaration
public void GetUpdateAsync()
  InitializeAutoCheck(TimeSpan)
Initializes the automatic update check.
Declaration
public void InitializeAutoCheck(TimeSpan timeSpan)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.TimeSpan | timeSpan | The time interval of the update check.  | 
      
StopAutoCheck()
Stops the automatic check.
Declaration
public void StopAutoCheck()
  Events
View SourceGetUpdateCompleted
Invoked when GetUpdateAsync() has been completed.
Declaration
public event AsyncCompletedEventHandler GetUpdateCompleted
  Event Type
| Type | Description | 
|---|---|
| System.ComponentModel.AsyncCompletedEventHandler | 
GetUpdateProgressChanged
Invoked when GetUpdateAsync() changed.
Declaration
public event ProgressChangedEventHandler GetUpdateProgressChanged
  Event Type
| Type | Description | 
|---|---|
| System.ComponentModel.ProgressChangedEventHandler | 
UpdateCheckCompleted
Invoked when the update check has been completed.
Declaration
public event UpdateCheckCompletedEventHandler UpdateCheckCompleted
  Event Type
| Type | Description | 
|---|---|
| UpdateCheckCompletedEventHandler |