Class FeedBuilder
Builds simple Feeds containing a single Implementation.
Implements
Namespace: ZeroInstall.Publish
Assembly: ZeroInstall.Publish.dll
Syntax
public class FeedBuilder : Object
Constructors
FeedBuilder()
Declaration
public FeedBuilder()
Properties
Candidates
Lists auto-detected candidates for EntryPoints.
Declaration
public IEnumerable<Candidate> Candidates { get; }
Property Value
Type | Description |
---|---|
IEnumerable<Candidate> |
CapabilityList
Set to configure CapabilityLists.
Declaration
public CapabilityList CapabilityList { get; set; }
Property Value
Type | Description |
---|---|
CapabilityList |
Commands
Lists the Command derived from Candidates and MainCandidate.
Declaration
public List<Command> Commands { get; }
Property Value
Type | Description |
---|---|
List<Command> |
EntryPoints
Lists the EntryPoints accompanying Commands.
Declaration
public List<EntryPoint> EntryPoints { get; }
Property Value
Type | Description |
---|---|
List<EntryPoint> |
Icons
Set to configure Icons.
Declaration
public ICollection<Icon> Icons { get; }
Property Value
Type | Description |
---|---|
ICollection<Icon> |
ID
The value used for ID.
Declaration
public string ID { get; }
Property Value
Type | Description |
---|---|
String |
ImplementationDirectory
Set the directory to search for Candidates and to generate the ManifestDigest from. Is usually a subdirectory of or equal to TemporaryDirectory.
Declaration
public string ImplementationDirectory { get; set; }
Property Value
Type | Description |
---|---|
String |
MainCandidate
Set the main entry point. Provides meta-data and startup instructions for the application. Should be one of the auto-detected Candidates.
Declaration
public Candidate MainCandidate { get; set; }
Property Value
Type | Description |
---|---|
Candidate |
ManifestDigest
The value used for ManifestDigest.
Declaration
public ManifestDigest ManifestDigest { get; }
Property Value
Type | Description |
---|---|
ManifestDigest |
RetrievalMethod
Set to configure RetrievalMethods.
Declaration
public RetrievalMethod RetrievalMethod { get; set; }
Property Value
Type | Description |
---|---|
RetrievalMethod |
SecretKey
Set to configure SecretKey.
Declaration
public OpenPgpSecretKey SecretKey { get; set; }
Property Value
Type | Description |
---|---|
OpenPgpSecretKey |
TemporaryDirectory
A temporary directory to prepare files for ImplementationDirectory. Not used by the FeedBuilder itself.
Declaration
public TemporaryDirectory TemporaryDirectory { get; set; }
Property Value
Type | Description |
---|---|
TemporaryDirectory |
Remarks
Setting a new value will automatically Dispose() the previous one.
Uri
Set to configure Uri.
Declaration
public FeedUri Uri { get; set; }
Property Value
Type | Description |
---|---|
FeedUri |
Methods
Build()
Generates a feed as described by the properties.
Declaration
public SignedFeed Build()
Returns
Type | Description |
---|---|
SignedFeed |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Required values have not been generated or set yet. |
DetectCandidates(ITaskHandler)
Detects Candidates in the ImplementationDirectory.
Declaration
public void DetectCandidates(ITaskHandler handler)
Parameters
Type | Name | Description |
---|---|---|
ITaskHandler | handler | A callback object used when the the user needs to be informed about IO tasks. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | ImplementationDirectory is |
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.
Declaration
public void Dispose()
GenerateCommands()
Generates Commands and EntryPoints bases on Candidates and MainCandidate.
Declaration
public void GenerateCommands()
Exceptions
Type | Condition |
---|---|
InvalidOperationException | MainCandidate is |
GenerateDigest(ITaskHandler)
Generates the ID and ManifestDigest.
Declaration
public void GenerateDigest(ITaskHandler handler)
Parameters
Type | Name | Description |
---|---|---|
ITaskHandler | handler | A callback object used when the the user needs to be informed about IO tasks. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | ImplementationDirectory is |
OperationCanceledException | The user canceled the task. |
IOException | There was a problem generating the manifest. |
UnauthorizedAccessException | Write access to temporary files was not permitted. |