Show / Hide Table of Contents

Class BuilderExtensions

Helpers for adding RetrievalMethods to IBuilders and setting missing properties.

Inheritance
Object
BuilderExtensions
Namespace: ZeroInstall.Publish
Assembly: ZeroInstall.Publish.dll
Syntax
public static class BuilderExtensions : Object

Methods

Add(IBuilder, DownloadRetrievalMethod, ICommandExecutor, ITaskHandler, String)

Applies a retrieval method to the implementation. Sets missing properties in the process.

Declaration
public static void Add(this IBuilder builder, DownloadRetrievalMethod retrievalMethod, ICommandExecutor executor, ITaskHandler handler, string localPath = null)
Parameters
Type Name Description
IBuilder builder

The builder.

DownloadRetrievalMethod retrievalMethod

The retrieval method.

ICommandExecutor executor

Used to modify properties in an undoable fashion.

ITaskHandler handler

A callback object used when the the user needs to be informed about IO tasks.

String localPath

An optional local file path where the retrievalMethod has already been downloaded.

Exceptions
Type Condition
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.

Declaration
public static void Add(this IBuilder builder, RetrievalMethod retrievalMethod, ICommandExecutor executor, ITaskHandler handler)
Parameters
Type Name Description
IBuilder builder

The builder.

RetrievalMethod retrievalMethod

The retrieval method.

ICommandExecutor executor

Used to modify properties in an undoable fashion.

ITaskHandler handler

A callback object used when the the user needs to be informed about IO tasks.

Exceptions
Type Condition
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.

Declaration
public static void CopyFrom(this IBuilder builder, CopyFromStep metadata, ITaskHandler handler)
Parameters
Type Name Description
IBuilder builder

The builder.

CopyFromStep metadata

The path of the source and destination file or directory.

ITaskHandler handler

A callback object used when the the user needs to be informed about IO tasks.

Exceptions
Type Condition
UnauthorizedAccessException

Access to a resource was denied.

IOException

An IO operation failed.

In This Article
Back to top Copyright Bastian Eicher et al