Table of Contents

Class FeedBuilder

Namespace
ZeroInstall.Publish
Assembly
ZeroInstall.Publish.dll

Builds simple Feeds containing a single Implementation.

public class FeedBuilder : IDisposable
Inheritance
FeedBuilder
Implements
Inherited Members

Properties

Candidates

Lists auto-detected candidates for EntryPoints.

public IEnumerable<Candidate> Candidates { get; }

Property Value

IEnumerable<Candidate>

CapabilityList

Set to configure CapabilityLists.

public CapabilityList? CapabilityList { get; set; }

Property Value

CapabilityList

Commands

Lists the Command derived from Candidates and MainCandidate.

public List<Command> Commands { get; }

Property Value

List<Command>

EntryPoints

Lists the EntryPoints accompanying Commands.

public List<EntryPoint> EntryPoints { get; }

Property Value

List<EntryPoint>

ID

The value used for ID.

public string? ID { get; }

Property Value

string

Icons

Set to configure Icons.

public ICollection<Icon> Icons { get; }

Property Value

ICollection<Icon>

ImplementationDirectory

Set the directory to search for Candidates and to generate the ManifestDigest from. Is usually a subdirectory of or equal to TemporaryDirectory.

public string? ImplementationDirectory { get; set; }

Property Value

string

MainCandidate

Set the main entry point. Provides meta-data and startup instructions for the application. Should be one of the auto-detected Candidates.

public Candidate? MainCandidate { get; set; }

Property Value

Candidate

ManifestDigest

The value used for ManifestDigest.

public ManifestDigest ManifestDigest { get; }

Property Value

ManifestDigest

RetrievalMethod

Set to configure RetrievalMethods.

public RetrievalMethod? RetrievalMethod { get; set; }

Property Value

RetrievalMethod

SecretKey

Set to configure SecretKey.

public OpenPgpSecretKey? SecretKey { get; set; }

Property Value

OpenPgpSecretKey

TemporaryDirectory

A temporary directory to prepare files for ImplementationDirectory. Not used by the FeedBuilder itself.

public TemporaryDirectory? TemporaryDirectory { get; set; }

Property Value

TemporaryDirectory

Remarks

Setting a new value will automatically Dispose() the previous one.

Uri

Set to configure Uri.

public FeedUri? Uri { get; set; }

Property Value

FeedUri

Methods

Build()

Generates a feed as described by the properties.

public SignedFeed Build()

Returns

SignedFeed

Exceptions

InvalidOperationException

Required values have not been generated or set yet.

DetectCandidates(ITaskHandler)

public void DetectCandidates(ITaskHandler handler)

Parameters

handler ITaskHandler

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

Exceptions

InvalidOperationException

ImplementationDirectory is null or empty.

OperationCanceledException

The user canceled the task.

IOException

There was a problem generating the manifest or detecting the executables.

UnauthorizedAccessException

Write access to temporary files was not permitted.

Dispose()

Deletes the TemporaryDirectory.

public void Dispose()

GenerateCommands()

Generates Commands and EntryPoints bases on Candidates and MainCandidate.

public void GenerateCommands()

Exceptions

InvalidOperationException

MainCandidate is null.

GenerateDigest(ITaskHandler)

Generates the ID and ManifestDigest.

public void GenerateDigest(ITaskHandler handler)

Parameters

handler ITaskHandler

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

Exceptions

InvalidOperationException

ImplementationDirectory is null or empty.

OperationCanceledException

The user canceled the task.

IOException

There was a problem generating the manifest.

UnauthorizedAccessException

Write access to temporary files was not permitted.