Table of Contents

Class ProgramUtils

Namespace
ZeroInstall.Commands
Assembly
0install.dll

Provides utility methods for application entry points.

public static class ProgramUtils
Inheritance
ProgramUtils
Inherited Members

Properties

UILanguage

The current UI language; null to use system default.

public static CultureInfo? UILanguage { get; set; }

Property Value

CultureInfo

Remarks

This value is only used on Windows and is stored in the Registry. For non-Windows platforms use the LC_* environment variables instead.

Methods

CliStartInfo(params string[])

Creates a ProcessStartInfo for launching an instance of the 0install command-line interface.

public static ProcessStartInfo? CliStartInfo(params string[] arguments)

Parameters

arguments string[]

Returns

ProcessStartInfo

GuiStartInfo(params string[])

Creates a ProcessStartInfo for launching an instance of the 0install graphical interface.

public static ProcessStartInfo? GuiStartInfo(params string[] arguments)

Parameters

arguments string[]

Returns

ProcessStartInfo

Init()

Common initialization code to be called by every Zero Install executable right after startup.

public static void Init()

Run(string, string[], ICommandHandler)

Parses command-line arguments and performs the indicated action. Performs error handling.

public static ExitCode Run(string exeName, string[] args, ICommandHandler handler)

Parameters

exeName string

The name of the executable to use as a reference in help messages and self-invocation.

args string[]

The arguments to be processed.

handler ICommandHandler

A callback object used when the user needs to be asked questions or informed about download and IO tasks.

Returns

ExitCode

The exit status code to end the process with. Cast to int to return from a Main method.