Class FeedEditing
Represents a Feed being edited using IUndoCommands.
Namespace: ZeroInstall.Publish
Assembly: ZeroInstall.Publish.dll
Syntax
public class FeedEditing : CommandManager<Feed>
Constructors
FeedEditing()
Starts with an empty feed.
Declaration
public FeedEditing()
FeedEditing(SignedFeed)
Starts with an existing feed.
Declaration
public FeedEditing(SignedFeed signedFeed)
Parameters
Type | Name | Description |
---|---|---|
SignedFeed | signedFeed | The feed to be edited. |
Properties
Passphrase
The passphrase to use to unlock SecretKey (if specified).
Declaration
public string Passphrase { get; set; }
Property Value
Type | Description |
---|---|
String |
SignedFeed
The (optionally signed) feed being edited.
Declaration
public SignedFeed SignedFeed { get; }
Property Value
Type | Description |
---|---|
SignedFeed |
UnsavedChanges
Indicates whether there are changes to the feed that have not yet been saved to a file.
Declaration
public bool UnsavedChanges { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
IsValid(out String)
Determines whether the feed is valid and ready for use by 0install.
Declaration
public bool IsValid(out string problem)
Parameters
Type | Name | Description |
---|---|---|
String | problem | Returns human-readable description of the problem if the method result is |
Returns
Type | Description |
---|---|
Boolean |
|
Load(String)
Loads a feed from an XML file (feed).
Declaration
public static FeedEditing Load(string path)
Parameters
Type | Name | Description |
---|---|---|
String | path | The file to load from. |
Returns
Type | Description |
---|---|
FeedEditing | A FeedEditing containing the loaded feed. |
Exceptions
Type | Condition |
---|---|
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).
Declaration
public override void Save(string path)
Parameters
Type | Name | Description |
---|---|---|
String | path | 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
Type | Condition |
---|---|
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. |