Table of Contents

Class ScopedOperation

Namespace
ZeroInstall.Commands
Assembly
0install.dll

Common base class for Zero Install operations that require scoped dependency resolution.

public abstract class ScopedOperation : ServiceProvider
Inheritance
ScopedOperation
Derived
Inherited Members

Constructors

ScopedOperation(ITaskHandler)

Common base class for Zero Install operations that require scoped dependency resolution.

protected ScopedOperation(ITaskHandler handler)

Parameters

handler ITaskHandler

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

Properties

MinimumNetworkUseForBackgroundSelfUpdate

The minimum EffectiveNetworkUse at which BackgroundSelfUpdate() will consider an update check.

protected virtual NetworkLevel MinimumNetworkUseForBackgroundSelfUpdate { get; }

Property Value

NetworkLevel

Methods

BackgroundSelfUpdate()

Automatically updates Zero Install itself in a background process.

protected bool BackgroundSelfUpdate()

Returns

bool

true if a background check was started; false if an update check was not due.

EnsureAllowed(FeedUri)

Ensures that the current config does not prohibit the use of the specified feed URI.

protected void EnsureAllowed(FeedUri uri)

Parameters

uri FeedUri

Exceptions

WebException

KioskMode is true and the uri is not the the Catalog.

FindByShortName(string)

Uses FindByShortName(string?) to find a Feed matching a specific short name.

protected Feed? FindByShortName(string shortName)

Parameters

shortName string

The short name to look for. Must match either Name or BinaryName of NameRun.

Returns

Feed

The first matching Feed; null if no match was found.

Remarks

Handles caching based on Refresh flag.

GetCanonicalUri(string)

Converts an interface or feed URI to its canonical representation.

public FeedUri GetCanonicalUri(string uri)

Parameters

uri string

Returns

FeedUri

Exceptions

UriFormatException

uri is an invalid interface URI.

GetCatalog()

Returns a merged view of all Catalogs specified by the configuration files.

protected Catalog GetCatalog()

Returns

Catalog

Remarks

Handles caching based on Refresh flag.

Exceptions

WebException

Attempted to download catalog and failed.

StartCommandBackground(string, params string[])

Starts executing a command in a background process. Returns immediately.

protected static void StartCommandBackground(string command, params string[] args)

Parameters

command string

The name of the command to execute.

args string[]

Additional arguments to pass to the command.