Class ScopedOperation
Common base class for Zero Install operations that require scoped dependency resolution.
Inherited Members
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 |
|
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; |
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 |
|
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. |