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
ITaskHandlerA 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
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
FindByShortName(string)
Uses FindByShortName(string?) to find a Feed matching a specific short name.
protected Feed? FindByShortName(string shortName)
Parameters
shortName
stringThe 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
uri
string
Returns
Exceptions
- UriFormatException
uri
is 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)