Zero Install .NET API 2.20.0
ZeroInstall.Commands.ProgramUtils Class Reference

Provides utility methods for application entry points. More...

Static Public Member Functions

static void Init ()
 Common initialization code to be called by every Zero Install executable right after startup.
 
static ExitCode Run (string exeName, string[] args, ICommandHandler handler)
 Parses command-line arguments and performs the indicated action. Performs error handling. More...
 

Static Public Attributes

const string CliAssemblyName = "0install"
 The assembly/EXE name for the command-line interface.
 

Properties

static ? CultureInfo???? UILanguage [getset]
 The current UI language; null to use system default. More...
 
static ? string GuiAssemblyName = WindowsUtils.IsGuiSession ? "0install-win" : null [get]
 The assembly/EXE name for the graphical interface; null if no GUI is available.
 

Detailed Description

Provides utility methods for application entry points.

Member Function Documentation

◆ Run()

static ExitCode ZeroInstall.Commands.ProgramUtils.Run ( string  exeName,
string[]  args,
ICommandHandler  handler 
)
inlinestatic

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

Parameters
exeNameThe name of the executable to use as a reference in help messages and self-invocation.
argsThe arguments to be processed.
handlerA callback object used when the the user needs to be asked questions or informed about download and IO tasks.
Returns
The exit status code to end the process with. Cast to int to return from a Main method.

Property Documentation

◆ UILanguage

? CultureInfo???? ZeroInstall.Commands.ProgramUtils.UILanguage
staticgetset

The current UI language; null to use system default.

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


The documentation for this class was generated from the following file: