Table of Contents

Class FeedEditing

Namespace
ZeroInstall.Publish
Assembly
ZeroInstall.Publish.dll

Represents a Feed being edited using IUndoCommands.

public class FeedEditing : CommandManager<Feed>, ICommandManager<Feed>, ICommandExecutor
Inheritance
FeedEditing
Implements
Inherited Members

Constructors

FeedEditing()

Starts with an empty feed.

public FeedEditing()

FeedEditing(SignedFeed)

Starts with an existing feed.

public FeedEditing(SignedFeed signedFeed)

Parameters

signedFeed SignedFeed

The feed to be edited.

Properties

Passphrase

The passphrase to use to unlock SecretKey (if specified).

public string? Passphrase { get; set; }

Property Value

string

SignedFeed

The (optionally signed) feed being edited.

public SignedFeed SignedFeed { get; }

Property Value

SignedFeed

UnsavedChanges

Indicates whether there are changes to the feed that have not yet been saved to a file.

public bool UnsavedChanges { get; }

Property Value

bool

Methods

IsValid(out string)

Determines whether the feed is valid and ready for use by 0install.

public bool IsValid(out string problem)

Parameters

problem string

Returns human-readable description of the problem if the method result is false.

Returns

bool

true if the feed is valid; false otherwise.

Load(string)

Loads a feed from an XML file (feed).

public static FeedEditing Load(string path)

Parameters

path string

The file to load from.

Returns

FeedEditing

A FeedEditing containing the loaded feed.

Exceptions

IOException

A problem occurred while reading the file.

UnauthorizedAccessException

Read access to the file is not permitted.

InvalidDataException

A problem occurred while deserializing an XML file.

Save(string)

Saves feed to an XML file, adds the default stylesheet and signs it with SecretKey (if specified).

public override void Save(string path)

Parameters

path string

The file to save to.

Remarks

Writing and signing the feed file are performed as an atomic operation (i.e. if signing fails an existing file remains unchanged).

Exceptions

IOException

A problem occurred while writing the file.

UnauthorizedAccessException

Write access to the file is not permitted.

KeyNotFoundException

The specified SecretKey could not be found on the system.

WrongPassphraseException

Passphrase was incorrect.