Table of Contents

Interface ICommandHandler

Namespace
ZeroInstall.Commands
Assembly
0install.dll

Callback methods to allow users to interact with CliCommands.

public interface ICommandHandler : ITaskHandler, IDisposable
Inherited Members

Remarks

The methods may be called from a background thread. Implementations apply appropriate thread-synchronization to update UI elements.

Properties

Background

Hides the GUI and uses something like a tray icon instead. Has no effect when IsGui is false.

bool Background { get; set; }

Property Value

bool

FeedUri

The URI of the Zero Install feed the current operation relates to.

FeedUri? FeedUri { get; set; }

Property Value

FeedUri

Remarks

This can be used to apply application-specific visual branding.

IsGui

Indicates whether this handler is a GUI.

bool IsGui { get; }

Property Value

bool

Methods

CloseUI()

Closes any persistent UI elements that were created.

void CloseUI()

CustomizeSelections(Func<Selections>)

Allows the user to customize the interface preferences and rerun the solver if desired. Returns once the user is finished.

void CustomizeSelections(Func<Selections> solveCallback)

Parameters

solveCallback Func<Selections>

Called after interface preferences have been changed and the solver needs to be rerun.

DisableUI()

Disables any persistent UI elements that were created but still leaves them visible.

void DisableUI()

ShowIntegrateApp(IntegrationState)

Displays application integration options to the user. Returns once the user is finished.

void ShowIntegrateApp(IntegrationState state)

Parameters

state IntegrationState

A View-Model for modifying the current desktop integration state.

Remarks

The caller is responsible for applying changes.

Exceptions

OperationCanceledException

The user does not want any changes to be applied.

ShowSelections(Selections, IFeedManager)

Shows the Selections made by the solver to the user. Returns immediately. May be ignored by some implementations.

void ShowSelections(Selections selections, IFeedManager feedManager)

Parameters

selections Selections

The Selections as provided by the solver.

feedManager IFeedManager

The feed manager used to retrieve feeds for additional information about implementations.