Class FeedBuilder
- Namespace
- ZeroInstall.Publish
- Assembly
- ZeroInstall.Publish.dll
Builds simple Feeds containing a single Implementation.
[MustDisposeResource]
public class FeedBuilder : IDisposable
- Inheritance
-
FeedBuilder
- Implements
- Inherited Members
Properties
Candidates
Lists auto-detected candidates for EntryPoints.
public IEnumerable<Candidate> Candidates { get; }
Property Value
CapabilityList
Set to configure CapabilityLists.
public CapabilityList? CapabilityList { get; set; }
Property Value
Commands
Lists the Command derived from Candidates and MainCandidate.
public List<Command> Commands { get; }
Property Value
EntryPoints
Lists the EntryPoints accompanying Commands.
public List<EntryPoint> EntryPoints { get; }
Property Value
ID
The value used for ID.
public string? ID { get; }
Property Value
Icons
Set to configure Icons.
public ICollection<Icon> Icons { get; }
Property Value
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
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
ManifestDigest
The value used for ManifestDigest.
public ManifestDigest ManifestDigest { get; }
Property Value
RetrievalMethod
Set to configure RetrievalMethods.
public RetrievalMethod? RetrievalMethod { get; set; }
Property Value
SecretKey
Set to configure SecretKey.
public OpenPgpSecretKey? SecretKey { get; set; }
Property Value
TemporaryDirectory
A temporary directory to prepare files for ImplementationDirectory. Not used by the FeedBuilder itself.
public TemporaryDirectory? TemporaryDirectory { get; set; }
Property Value
Remarks
Setting a new value will automatically Dispose() the previous one.
Uri
Set to configure Uri.
public FeedUri? Uri { get; set; }
Property Value
Methods
Build()
Generates a feed as described by the properties.
public SignedFeed Build()
Returns
Exceptions
- InvalidOperationException
Required values have not been generated or set yet.
DetectCandidates(ITaskHandler)
Detects Candidates in the ImplementationDirectory.
public void DetectCandidates(ITaskHandler handler)
Parameters
handler
ITaskHandlerA callback object used when 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
ITaskHandlerA callback object used when 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.