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
handlerITaskHandlerA callback object used when 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
Methods
BackgroundSelfUpdate()
Automatically updates Zero Install itself in a background process.
protected bool BackgroundSelfUpdate()
Returns
- bool
trueif a background check was started;falseif 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
uriFeedUri
Exceptions
FindByShortName(string)
Uses FindByShortName(string?) to find a Feed matching a specific short name.
protected Feed? FindByShortName(string shortName)
Parameters
shortNamestringThe short name to look for. Must match either Name or BinaryName of NameRun.
Returns
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
uristring
Returns
Exceptions
- UriFormatException
uriis an invalid interface URI.
StartCommandBackground(string, params string[])
Starts executing a command in a background process. Returns immediately.
protected static void StartCommandBackground(string command, params string[] args)