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
builderIBuilderThe builder.
retrievalMethodDownloadRetrievalMethodThe retrieval method.
executorICommandExecutorUsed to modify properties in an undoable fashion.
handlerITaskHandlerA callback object used when the user needs to be informed about IO tasks.
localPathstringAn optional local file path where the
retrievalMethodhas 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
localPathis 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
builderIBuilderThe builder.
retrievalMethodRetrievalMethodThe retrieval method.
executorICommandExecutorUsed to modify properties in an undoable fashion.
handlerITaskHandlerA callback object used when 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
builderIBuilderThe builder.
metadataCopyFromStepThe path of the source and destination file or directory.
handlerITaskHandlerA callback object used when the user needs to be informed about IO tasks.
Exceptions
- UnauthorizedAccessException
Access to a resource was denied.
- IOException
An IO operation failed.