Skip to main content

Interface IUpdateService

Provides an abstraction for the Meadow Update Service

Assembly: Meadow.Contracts.dll
View Source
Declaration
public interface IUpdateService

Properties

CanUpdate

Returns the update service's current ability to apply an update

View Source
Declaration
bool CanUpdate { get; }

State

Gets the current state of the service

View Source
Declaration
UpdateState State { get; }

Methods

RetrieveUpdate(UpdateInfo)

Retrieves an update package from the defined update server with the provided parameters

View Source
Declaration
void RetrieveUpdate(UpdateInfo updateInfo)
Parameters
TypeNameDescription
Meadow.Update.UpdateInfoupdateInfoThe UpdateInfo describing the update to retrieve

ApplyUpdate(UpdateInfo)

Applies an already-retrieved update package with the provided parameters

View Source
Declaration
void ApplyUpdate(UpdateInfo updateInfo)
Parameters
TypeNameDescription
Meadow.Update.UpdateInfoupdateInfoThe UpdateInfo describing the update to apply

ClearUpdates()

Clears all locally stored update package information

View Source
Declaration
void ClearUpdates()

Shutdown()

Stops the service

View Source
Declaration
void Shutdown()

Events

OnStateChanged

Event raised when an the state of the Update service changes

View Source
Declaration
event EventHandler<UpdateState> OnStateChanged
Event Type

System.EventHandler<Meadow.Update.UpdateState>

OnUpdateAvailable

Event raised when an update is available on the defined Update server

View Source
Declaration
event UpdateEventHandler OnUpdateAvailable
Event Type

Meadow.Update.UpdateEventHandler

OnUpdateProgress

Event raised with an update on download progress

View Source
Declaration
event UpdateEventHandler OnUpdateProgress
Event Type

Meadow.Update.UpdateEventHandler

OnUpdateRetrieved

Event raised after an update package has been retrieved from the defined Update server

View Source
Declaration
event UpdateEventHandler OnUpdateRetrieved
Event Type

Meadow.Update.UpdateEventHandler

OnUpdateSuccess

Event raised after an update package has been successfully applied

View Source
Declaration
event UpdateEventHandler OnUpdateSuccess
Event Type

Meadow.Update.UpdateEventHandler

OnUpdateFailure

Event raised if a failure occurs in an attempt to apply an update package

View Source
Declaration
event UpdateEventHandler OnUpdateFailure
Event Type

Meadow.Update.UpdateEventHandler