Table of Contents

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

string

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

string

XsiSchemaLocation

Provides XML Editors with location hints for XSD files.

public string XsiSchemaLocation

Field Value

string

Properties

Entries

A list of AppEntrys.

[UnorderedEquality]
public List<AppEntry> Entries { get; }

Property Value

List<AppEntry>

this[FeedUri]

Gets an AppEntry for a specific interface URI.

public AppEntry this[FeedUri interfaceUri] { get; }

Parameters

interfaceUri FeedUri

The InterfaceUri to look for.

Property Value

AppEntry

The first matching AppEntry.

Exceptions

KeyNotFoundException

No entry matching the interface URI was found.

Methods

Clone()

Creates a deep copy of this AppList instance.

public AppList Clone()

Returns

AppList

The new copy of the AppList.

ContainsEntry(FeedUri)

Checks whether an AppEntry for a specific interface URI exists.

public bool ContainsEntry(FeedUri interfaceUri)

Parameters

interfaceUri FeedUri

The InterfaceUri to look for.

Returns

bool

true if a matching entry was found; false otherwise.

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

FindAppAlias(string)

Retrieves a specific AppAlias.

public (AppAlias alias, AppEntry appEntry)? FindAppAlias(string aliasName)

Parameters

aliasName string

The name of the alias to search for.

Returns

(AppAlias alias, AppEntry appEntry)?

The first AppAlias matching aliasName and the AppEntry containing it; null if 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

machineWide bool

Store the AppList machine-wide instead of just for the current user.

Returns

string

GetEntry(FeedUri)

Gets an AppEntry for a specific interface URI. Safe for missing elements.

public AppEntry? GetEntry(FeedUri interfaceUri)

Parameters

interfaceUri FeedUri

The InterfaceUri to look for.

Returns

AppEntry

The first matching AppEntry; null if no match was found.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

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

machineWide bool

Load the machine-wide AppList instead of the one for the current user.

Returns

AppList

The loaded AppList.

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

stream Stream

The ZIP archive to load.

password string

The password to use for decryption; null for no encryption.

Returns

AppList

The loaded list.

Exceptions

ZipException

A problem occurred while reading the ZIP data or password is 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

aliasName string

The name of the alias to search for.

Returns

FeedUri

The target feed of the alias; null if 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

stream Stream

The ZIP archive to be written.

password string

The password to use for encryption; null for no encryption.

Search(string?)

Returns all AppEntrys that match a specific search query.

public IEnumerable<AppEntry> Search(string? query)

Parameters

query string

The search query. Must be contained within Name.

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

left AppList

The left object

right AppList

The right object

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

left AppList

The left object

right AppList

The right object

Returns

bool

true if the objects are not equal; otherwise, false.