Show / Hide Table of Contents

Class ScopedOperation

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

Inheritance
Object
ServiceProvider
ScopedOperation
CliCommand
Inherited Members
ServiceProvider.TrySolveOffline(Requirements)
ServiceProvider.Handler
ServiceProvider.Config
ServiceProvider.ImplementationStore
ServiceProvider.OpenPgp
ServiceProvider.FeedCache
ServiceProvider.TrustManager
ServiceProvider.FeedManager
ServiceProvider.CatalogManager
ServiceProvider.PackageManager
ServiceProvider.SelectionCandidateProvider
ServiceProvider.Solver
ServiceProvider.Fetcher
ServiceProvider.Executor
ServiceProvider.SelectionsManager
Namespace: ZeroInstall.Commands
Assembly: 0install.dll
Syntax
public abstract class ScopedOperation : ServiceProvider

Constructors

ScopedOperation(ITaskHandler)

Creates a new command base.

Declaration
protected ScopedOperation(ITaskHandler handler)
Parameters
Type Name Description
ITaskHandler handler

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.

Declaration
protected virtual NetworkLevel MinimumNetworkUseForBackgroundSelfUpdate { get; }
Property Value
Type Description
NetworkLevel

Methods

BackgroundSelfUpdate()

Automatically updates Zero Install itself in a background process.

Declaration
protected bool BackgroundSelfUpdate()
Returns
Type Description
Boolean

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

FindByShortName(String)

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

Declaration
protected Feed FindByShortName(string shortName)
Parameters
Type Name Description
String shortName

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

Returns
Type Description
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.

Declaration
public FeedUri GetCanonicalUri(string uri)
Parameters
Type Name Description
String uri
Returns
Type Description
FeedUri
Exceptions
Type Condition
UriFormatException

uri is an invalid interface URI.

GetCatalog()

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

Declaration
protected Catalog GetCatalog()
Returns
Type Description
Catalog
Remarks

Handles caching based on Refresh flag.

Exceptions
Type Condition
WebException

Attempted to download catalog and failed.

StartCommandBackground(String, String[])

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

Declaration
protected static void StartCommandBackground(string command, params string[] args)
Parameters
Type Name Description
String command

The name of the command to execute.

String[] args

Additional arguments to pass to the command.

In This Article
Back to top Copyright Bastian Eicher et al