Zero Install .NET API 2.20.0
ZeroInstall.Publish.RetrievalMethodExtensions Class Reference

Helpers for setting missing properties on RetrievalMethods. More...

Static Public Member Functions

static void SetMissing (this DownloadRetrievalMethod retrievalMethod, ICommandExecutor executor, string? localPath=null)
 Sets missing properties on the retrieval method if they can be inferred. More...
 
static ManifestDigest CalculateDigest (this RetrievalMethod retrievalMethod, ICommandExecutor executor, ITaskHandler handler, ManifestFormat? format=null)
 Calculates a ManifestDigest for a retrieval method. Sets missing properties in the process. More...
 
static TemporaryDirectory ToTempDir (this DownloadRetrievalMethod retrievalMethod, ITaskHandler handler, string? localPath=null)
 Creates a temporary directory from a retrieval method. Sets missing properties in the process. More...
 

Detailed Description

Helpers for setting missing properties on RetrievalMethods.

Member Function Documentation

◆ CalculateDigest()

static ManifestDigest ZeroInstall.Publish.RetrievalMethodExtensions.CalculateDigest ( this RetrievalMethod  retrievalMethod,
ICommandExecutor  executor,
ITaskHandler  handler,
ManifestFormat format = null 
)
inlinestatic

Calculates a ManifestDigest for a retrieval method. Sets missing properties in the process.

Parameters
retrievalMethodThe retrieval method.
executorUsed to modify properties in an undoable fashion.
handlerA callback object used when the the user is to be informed about progress.
formatThe manifest format. Leave null for default.
Returns
The generated digest.
Exceptions
OperationCanceledExceptionThe user canceled the task.
WebExceptionA file could not be downloaded from the internet.

◆ SetMissing()

static void ZeroInstall.Publish.RetrievalMethodExtensions.SetMissing ( this DownloadRetrievalMethod  retrievalMethod,
ICommandExecutor  executor,
string?  localPath = null 
)
inlinestatic

Sets missing properties on the retrieval method if they can be inferred.

Parameters
retrievalMethodThe retrieval method.
executorUsed to modify properties in an undoable fashion.
localPathAn optional local file path where the retrievalMethod has already been downloaded.

◆ ToTempDir()

static TemporaryDirectory ZeroInstall.Publish.RetrievalMethodExtensions.ToTempDir ( this DownloadRetrievalMethod  retrievalMethod,
ITaskHandler  handler,
string?  localPath = null 
)
inlinestatic

Creates a temporary directory from a retrieval method. Sets missing properties in the process.

Parameters
retrievalMethodThe retrieval method.
handlerA callback object used when the the user is to be informed about progress.
localPathAn optional local file path where the retrievalMethod has already been downloaded. Leave null to download automatically.
Returns
A temporary directory built using the retrieval method.
Exceptions
OperationCanceledExceptionThe user canceled the task.
WebExceptionA file could not be downloaded from the internet.
IOExceptionThere is a problem writing a temporary file.
UnauthorizedAccessExceptionWrite access to a temporary file is not permitted.

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