Zero Install .NET API 2.20.0
ZeroInstall.Services.Fetchers.Fetcher Class Reference

Downloads Implementations, extracts them and adds them to an IImplementationStore. More...

Inheritance diagram for ZeroInstall.Services.Fetchers.Fetcher:
ZeroInstall.Services.Fetchers.IFetcher

Public Member Functions

void Fetch (Implementation implementation)
 Downloads an Implementation to the IImplementationStore. More...
 

Protected Member Functions

virtual void Fetch (Implementation implementation, string tag)
 Downloads an Implementation to the IImplementationStore. More...
 
virtual void Retrieve (Implementation implementation, string tag)
 Tries one RetrievalMethod after another (sorted by RetrievalMethodRanker). More...
 
virtual void Retrieve (RetrievalMethod retrievalMethod, ManifestDigest manifestDigest, string tag)
 Executes a retrieval method to build an implementation. More...
 
virtual void Retrieve (IReadOnlyCollection< IRecipeStep > steps, ManifestDigest manifestDigest, string tag)
 Executes the steps of a retrieval method to build an implementation. More...
 
void CheckArchiveTypes (IEnumerable< Archive > archives)
 Infers missing Archive.MimeTypes and ensures suitable IArchiveExtractors are available. More...
 
virtual void Apply (IBuilder builder, IRecipeStep step, string tag)
 Applies a retrieval method step. More...
 
virtual void Download (IBuilder builder, DownloadRetrievalMethod download, string tag)
 Applies a download step. More...
 
string? GetPath (ImplementationBase implementation)
 Determines the local path of an implementation. More...
 
virtual void Retrieve (ExternalRetrievalMethod retrievalMethod)
 Executes an external retrieval method.
 

Protected Attributes

readonly Config Config
 User settings controlling network behaviour, solving, etc.
 
readonly IImplementationStore Store
 The location to store the downloaded and unpacked Implementations in.
 
readonly ITaskHandler Handler
 A callback object used when the the user needs to be informed about progress.
 

Detailed Description

Downloads Implementations, extracts them and adds them to an IImplementationStore.

This class is immutable and thread-safe.

Member Function Documentation

◆ Apply()

virtual void ZeroInstall.Services.Fetchers.Fetcher.Apply ( IBuilder  builder,
IRecipeStep  step,
string  tag 
)
inlineprotectedvirtual

Applies a retrieval method step.

Parameters
builderThe builder used to build the implementation.
stepInstructions for downloading the file.
tagA ITask.Tag used to group progress bars.

◆ CheckArchiveTypes()

void ZeroInstall.Services.Fetchers.Fetcher.CheckArchiveTypes ( IEnumerable< Archive archives)
inlineprotected

Infers missing Archive.MimeTypes and ensures suitable IArchiveExtractors are available.

Exceptions
NotSupportedExceptionNo extractor registered for the specified or inferred Archive.MimeType.

◆ Download()

virtual void ZeroInstall.Services.Fetchers.Fetcher.Download ( IBuilder  builder,
DownloadRetrievalMethod  download,
string  tag 
)
inlineprotectedvirtual

Applies a download step.

Parameters
builderThe builder used to build the implementation.
downloadInstructions for downloading the file.
tagA ITask.Tag used to group progress bars.

◆ Fetch() [1/2]

void ZeroInstall.Services.Fetchers.Fetcher.Fetch ( Implementation  implementation)
inline

Downloads an Implementation to the IImplementationStore.

Implements ZeroInstall.Services.Fetchers.IFetcher.

◆ Fetch() [2/2]

virtual void ZeroInstall.Services.Fetchers.Fetcher.Fetch ( Implementation  implementation,
string  tag 
)
inlineprotectedvirtual

Downloads an Implementation to the IImplementationStore.

Parameters
implementationThe implementation to download.
tagA ITask.Tag used to group progress bars.

◆ GetPath()

string? ZeroInstall.Services.Fetchers.Fetcher.GetPath ( ImplementationBase  implementation)
protected

Determines the local path of an implementation.

Returns
A fully qualified path to the directory containing the implementation; null if the requested implementation could not be found in the store or is a package implementation.

◆ Retrieve() [1/3]

virtual void ZeroInstall.Services.Fetchers.Fetcher.Retrieve ( Implementation  implementation,
string  tag 
)
protectedvirtual

Tries one RetrievalMethod after another (sorted by RetrievalMethodRanker).

Parameters
implementationThe implementation to be retrieved.
tagA ITask.Tag used to group progress bars.

◆ Retrieve() [2/3]

virtual void ZeroInstall.Services.Fetchers.Fetcher.Retrieve ( IReadOnlyCollection< IRecipeStep steps,
ManifestDigest  manifestDigest,
string  tag 
)
inlineprotectedvirtual

Executes the steps of a retrieval method to build an implementation.

Parameters
stepsThe retrieval method steps.
manifestDigestThe expected manifest digest of the implementation.
tagA ITask.Tag used to group progress bars.

◆ Retrieve() [3/3]

virtual void ZeroInstall.Services.Fetchers.Fetcher.Retrieve ( RetrievalMethod  retrievalMethod,
ManifestDigest  manifestDigest,
string  tag 
)
inlineprotectedvirtual

Executes a retrieval method to build an implementation.

Parameters
retrievalMethodThe retrieval method.
manifestDigestThe expected manifest digest of the implementation.
tagA ITask.Tag used to group progress bars.

The documentation for this class was generated from the following file: