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

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

Static Public Member Functions

static void Register (FeedTarget target, Model.Capabilities.UrlProtocol urlProtocol, IIconStore iconStore, bool machineWide, bool accessPoint=false)
 Registers a URL protocol in the current system. More...
 
static void Unregister (Model.Capabilities.UrlProtocol urlProtocol, bool machineWide, bool accessPoint=false)
 Unregisters a URL protocol in the current system. More...
 

Static Public Attributes

const string ProtocolIndicator = "URL Protocol"
 The registry value name used to indicate that a programmatic identifier is actually a ULR protocol handler.
 
const string RegKeyUserVistaUrlAssoc = @"Software\Microsoft\Windows\Shell\Associations\UrlAssociations"
 The HKCU registry key where Windows Vista and newer store URL protocol associations.
 

Detailed Description

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

Member Function Documentation

◆ Register()

static void ZeroInstall.DesktopIntegration.Windows.UrlProtocol.Register ( FeedTarget  target,
Model.Capabilities.UrlProtocol  urlProtocol,
IIconStore  iconStore,
bool  machineWide,
bool  accessPoint = false 
)
inlinestatic

Registers a URL protocol in the current system.

Parameters
targetThe application being integrated.
urlProtocolThe URL protocol to register.
machineWideRegister the URL protocol machine-wide instead of just for the current user.
iconStoreStores icon files downloaded from the web as local files.
accessPointIndicates that the handler shall become the default handler for the protocol.
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.

◆ Unregister()

static void ZeroInstall.DesktopIntegration.Windows.UrlProtocol.Unregister ( Model.Capabilities.UrlProtocol  urlProtocol,
bool  machineWide,
bool  accessPoint = false 
)
inlinestatic

Unregisters a URL protocol in the current system.

Parameters
urlProtocolThe URL protocol to remove.
machineWideUnregister the URL protocol machine-wide instead of just for the current user.
accessPointIndicates that the handler was the default handler for the protocol.
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: