Class BuilderExtensions
- Namespace
- ZeroInstall.Publish
- Assembly
- ZeroInstall.Publish.dll
Helpers for adding RetrievalMethods to IBuilders and setting missing properties.
public static class BuilderExtensions
- Inheritance
-
BuilderExtensions
- Inherited Members
Methods
Add(IBuilder, DownloadRetrievalMethod, ICommandExecutor, ITaskHandler, string?)
Applies a retrieval method to the implementation. Sets missing properties in the process.
public static void Add(this IBuilder builder, DownloadRetrievalMethod retrievalMethod, ICommandExecutor executor, ITaskHandler handler, string? localPath = null)
Parameters
builder
IBuilderThe builder.
retrievalMethod
DownloadRetrievalMethodThe retrieval method.
executor
ICommandExecutorUsed to modify properties in an undoable fashion.
handler
ITaskHandlerA callback object used when the the user needs to be informed about IO tasks.
localPath
stringAn optional local file path where the
retrievalMethod
has already been downloaded.
Exceptions
- OperationCanceledException
The user canceled the task.
- WebException
A file could not be downloaded from the internet.
- IOException
There is a problem accessing
localPath
.- UnauthorizedAccessException
Read access to
localPath
is not permitted.
Add(IBuilder, RetrievalMethod, ICommandExecutor, ITaskHandler)
Applies a retrieval method to the implementation. Sets missing properties in the process.
public static void Add(this IBuilder builder, RetrievalMethod retrievalMethod, ICommandExecutor executor, ITaskHandler handler)
Parameters
builder
IBuilderThe builder.
retrievalMethod
RetrievalMethodThe retrieval method.
executor
ICommandExecutorUsed to modify properties in an undoable fashion.
handler
ITaskHandlerA callback object used when the the user needs to be informed about IO tasks.
Exceptions
- OperationCanceledException
The user canceled the task.
- WebException
A file could not be downloaded from the internet.
CopyFrom(IBuilder, CopyFromStep, ITaskHandler)
Copies files or directories from another implementation fetched by an external 0install process.
public static void CopyFrom(this IBuilder builder, CopyFromStep metadata, ITaskHandler handler)
Parameters
builder
IBuilderThe builder.
metadata
CopyFromStepThe path of the source and destination file or directory.
handler
ITaskHandlerA callback object used when the the user needs to be informed about IO tasks.
Exceptions
- UnauthorizedAccessException
Access to a resource was denied.
- IOException
An IO operation failed.