Zero Install .NET API 2.20.0
ZeroInstall.DesktopIntegration.Windows.ContextMenu Class Reference

Contains control logic for applying Model.Capabilities.ContextMenu and AccessPoints.ContextMenu on Windows systems. More...

Static Public Member Functions

static void Apply (FeedTarget target, Model.Capabilities.ContextMenu contextMenu, IIconStore iconStore, bool machineWide)
 Adds a context menu entry to the current system. More...
 
static void Remove (Model.Capabilities.ContextMenu contextMenu, bool machineWide)
 Removes a context menu entry from the current system. More...
 

Static Public Attributes

const string Prefix = RegistryClasses.Prefix + "ContextMenu."
 Prepended before programmatic identifiers used by Zero Install in the registry. This prevents conflicts with non-Zero Install installations.
 
const string RegKeyClassesFiles = "*"
 The HKCU registry key for registering things for all files.
 
static readonly string[] RegKeyClassesExecutableFiles = {"exefile", "batfile", "cmdfile"}
 The HKCU registry key for registering things for different kinds of executable files.
 
const string RegKeyClassesDirectories = "Directory"
 The HKCU registry key for registering things for all directories.
 
const string RegKeyClassesAll = "AllFilesystemObjects"
 The HKCU registry key for registering things for all filesystem objects (files and directories).
 

Detailed Description

Contains control logic for applying Model.Capabilities.ContextMenu and AccessPoints.ContextMenu on Windows systems.

Member Function Documentation

◆ Apply()

static void ZeroInstall.DesktopIntegration.Windows.ContextMenu.Apply ( FeedTarget  target,
Model.Capabilities.ContextMenu  contextMenu,
IIconStore  iconStore,
bool  machineWide 
)
inlinestatic

Adds a context menu entry to the current system.

Parameters
targetThe application being integrated.
contextMenuThe context menu entry to add.
iconStoreA callback object used when the the user is to be informed about the progress of long-running operations such as downloads.
machineWideAdd the context menu entry machine-wide instead of just for the current user.
Exceptions
OperationCanceledExceptionThe user canceled the task.
IOExceptionA problem occurred while writing to the filesystem or registry.
WebExceptionA problem occurred while downloading additional data (such as icons).
UnauthorizedAccessExceptionWrite access to the filesystem or registry is not permitted.

◆ Remove()

static void ZeroInstall.DesktopIntegration.Windows.ContextMenu.Remove ( Model.Capabilities.ContextMenu  contextMenu,
bool  machineWide 
)
inlinestatic

Removes a context menu entry from the current system.

Parameters
contextMenuThe context menu entry to remove.
machineWideRemove the context menu entry machine-wide instead of just for the current user.
Exceptions
IOExceptionA problem occurred while writing to the filesystem or registry.
UnauthorizedAccessExceptionWrite access to the filesystem or registry is not permitted.

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