Class AppList
- Namespace
- ZeroInstall.DesktopIntegration
- Assembly
- ZeroInstall.DesktopIntegration.dll
Stores a list of applications and the kind of desktop integration the user chose for them.
[XmlNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance")]
[Equatable]
public sealed class AppList : XmlUnknown, IEquatable<XmlUnknown>, ICloneable<AppList>, IEquatable<AppList>
- Inheritance
-
AppList
- Implements
- Inherited Members
- Extension Methods
Fields
XmlNamespace
The XML namespace used for storing application list data.
public const string XmlNamespace = "http://0install.de/schema/desktop-integration/app-list"
Field Value
XsdLocation
The URI to retrieve an XSD containing the XML Schema information for this class in serialized form.
public const string XsdLocation = "https://docs.0install.net/specifications/app-list.xsd"
Field Value
XsiSchemaLocation
Provides XML Editors with location hints for XSD files.
public string XsiSchemaLocation
Field Value
Properties
Entries
A list of AppEntrys.
[UnorderedEquality]
public List<AppEntry> Entries { get; }
Property Value
this[FeedUri]
Gets an AppEntry for a specific interface URI.
public AppEntry this[FeedUri interfaceUri] { get; }
Parameters
interfaceUriFeedUriThe InterfaceUri to look for.
Property Value
Exceptions
- KeyNotFoundException
No entry matching the interface URI was found.
Methods
Clone()
Creates a deep copy of this AppList instance.
public AppList Clone()
Returns
ContainsEntry(FeedUri)
Checks whether an AppEntry for a specific interface URI exists.
public bool ContainsEntry(FeedUri interfaceUri)
Parameters
interfaceUriFeedUriThe InterfaceUri to look for.
Returns
- bool
trueif a matching entry was found;falseotherwise.
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
FindAppAlias(string)
Retrieves a specific AppAlias.
public (AppAlias alias, AppEntry appEntry)? FindAppAlias(string aliasName)
Parameters
aliasNamestringThe name of the alias to search for.
Returns
- (AppAlias alias, AppEntry appEntry)?
The first AppAlias matching
aliasNameand the AppEntry containing it;nullif none was found.
GetDefaultPath(bool)
Returns the default file path used to store the main AppList on this system.
public static string GetDefaultPath(bool machineWide = false)
Parameters
Returns
GetEntry(FeedUri)
Gets an AppEntry for a specific interface URI. Safe for missing elements.
public AppEntry? GetEntry(FeedUri interfaceUri)
Parameters
interfaceUriFeedUriThe InterfaceUri to look for.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
IsEmpty(bool)
Indicates whether there are currently no apps in the AppList.
public static bool IsEmpty(bool machineWide = false)
Parameters
machineWidebool
Returns
LoadSafe(bool)
Tries to load the AppList from its default location. Automatically falls back to an empty list on errors.
public static AppList LoadSafe(bool machineWide = false)
Parameters
Returns
LoadXmlZip(Stream, string?)
Loads a list from an XML file embedded in a ZIP archive.
public static AppList LoadXmlZip(Stream stream, string? password = null)
Parameters
streamStreamThe ZIP archive to load.
passwordstringThe password to use for decryption;
nullfor no encryption.
Returns
- AppList
The loaded list.
Exceptions
- ZipException
A problem occurred while reading the ZIP data or
passwordis wrong.- InvalidDataException
A problem occurred while deserializing an XML file.
ResolveAlias(string)
Retrieves the target URI of a specific AppAlias.
public FeedUri? ResolveAlias(string aliasName)
Parameters
aliasNamestringThe name of the alias to search for.
Returns
- FeedUri
The target feed of the alias;
nullif none was found.
SaveXmlZip(Stream, string?)
Saves the list in an XML file embedded in a ZIP archive.
public void SaveXmlZip(Stream stream, string? password = null)
Parameters
streamStreamThe ZIP archive to be written.
passwordstringThe password to use for encryption;
nullfor no encryption.
Search(string?)
Returns all AppEntrys that match a specific search query.
public IEnumerable<AppEntry> Search(string? query)
Parameters
Returns
- IEnumerable<AppEntry>
All AppEntrys matching
query.
Operators
operator ==(AppList?, AppList?)
Indicates whether the object on the left is equal to the object on the right.
public static bool operator ==(AppList? left, AppList? right)
Parameters
Returns
- bool
true if the objects are equal; otherwise, false.
operator !=(AppList?, AppList?)
Indicates whether the object on the left is not equal to the object on the right.
public static bool operator !=(AppList? left, AppList? right)
Parameters
Returns
- bool
true if the objects are not equal; otherwise, false.