Show / Hide Table of Contents

Interface ICommandHandler

Callback methods to allow users to interact with CliCommands.

Namespace: ZeroInstall.Commands
Assembly: 0install.dll
Syntax
public interface ICommandHandler
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.

Declaration
bool Background { get; set; }
Property Value
Type Description
Boolean

FeedUri

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

Declaration
FeedUri FeedUri { get; set; }
Property Value
Type Description
FeedUri
Remarks

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

IsGui

Indicates whether this handler is a GUI.

Declaration
bool IsGui { get; }
Property Value
Type Description
Boolean

Methods

CloseUI()

Closes any persistent UI elements that were created.

Declaration
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.

Declaration
void CustomizeSelections(Func<Selections> solveCallback)
Parameters
Type Name Description
Func<Selections> solveCallback

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.

Declaration
void DisableUI()

ShowIntegrateApp(IntegrationState)

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

Declaration
void ShowIntegrateApp(IntegrationState state)
Parameters
Type Name Description
IntegrationState state

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

Remarks

The caller is responsible for applying changes.

Exceptions
Type Condition
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.

Declaration
void ShowSelections(Selections selections, IFeedManager feedManager)
Parameters
Type Name Description
Selections selections

The Selections as provided by the solver.

IFeedManager feedManager

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

In This Article
Back to top Copyright Bastian Eicher et al