Characteristic Locus
Inheritance System.Object > App<D>
Implements IAsyncDisposable
Namespace Meadow
Assembly Meadow.dll

Syntax

public abstract class App<D> : IApp, IAsyncDisposable where D : class, IMeadowDevice

Type Parameters

Name Description
D

Constructors

App()

Declaration
protected App()

Properties

Abort

The app cancellation token

Declaration
public static CancellationToken Abort { get; protected set; }

Property Value

Type Description
CancellationToken

CancellationToken

Declaration
public CancellationToken CancellationToken { get; }

Property Value

Type Description
CancellationToken

Device

The root Device interface

Declaration
public static D Device { get; protected set; }

Property Value

Type Description
D

Methods

DisposeAsync()

Declaration
public virtual ValueTask DisposeAsync()

Returns

Type Description
ValueTask

Initialize()

Declaration
public virtual Task Initialize()

Returns

Type Description
Task

InvokeOnMainThread(Action<Object>, Nullable<Object>)

Declaration
public void InvokeOnMainThread(Action<object> action, object? state = null)

Parameters

Type Name Description
Action<System.Object> action
System.Nullable<System.Object> state

OnError(Exception)

Declaration
public virtual Task OnError(Exception e)

Parameters

Type Name Description
Exception e

Returns

Type Description
Task

OnShutdown()

Declaration
public virtual Task OnShutdown()

Returns

Type Description
Task

OnUpdate(Version, out Boolean)

Called when the application is about to update itself.

Declaration
public void OnUpdate(Version newVersion, out bool approveUpdate)

Parameters

Type Name Description
Version newVersion
System.Boolean approveUpdate

OnUpdateComplete(Version, out Boolean)

Called when the application has updated itself.

Declaration
public void OnUpdateComplete(Version oldVersion, out bool rollbackUpdate)

Parameters

Type Name Description
Version oldVersion
System.Boolean rollbackUpdate

Run()

Declaration
public virtual Task Run()

Returns

Type Description
Task