Show / Hide Table of Contents

Class ProgramUtils

Provides utility methods for application entry points.

Inheritance
Object
ProgramUtils
Namespace: ZeroInstall.Commands
Assembly: 0install.dll
Syntax
public static class ProgramUtils : Object

Properties

UILanguage

The current UI language; null to use system default.

Declaration
public static CultureInfo UILanguage { get; set; }
Property Value
Type Description
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(String[])

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

Declaration
public static ProcessStartInfo CliStartInfo(params string[] arguments)
Parameters
Type Name Description
String[] arguments
Returns
Type Description
ProcessStartInfo

GuiStartInfo(String[])

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

Declaration
public static ProcessStartInfo GuiStartInfo(params string[] arguments)
Parameters
Type Name Description
String[] arguments
Returns
Type Description
ProcessStartInfo

Init()

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

Declaration
public static void Init()

Run(String, String[], ICommandHandler)

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

Declaration
public static ExitCode Run(string exeName, string[] args, ICommandHandler handler)
Parameters
Type Name Description
String exeName

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

String[] args

The arguments to be processed.

ICommandHandler handler

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

Returns
Type Description
ExitCode

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

In This Article
Back to top Copyright Bastian Eicher et al