Class AppList
Stores a list of applications and the kind of desktop integration the user chose for them.
Inherited Members
Namespace: ZeroInstall.DesktopIntegration
Assembly: ZeroInstall.DesktopIntegration.dll
Syntax
public sealed class AppList : XmlUnknown
Constructors
AppList()
Declaration
public AppList()
Fields
XmlNamespace
The XML namespace used for storing application list data.
Declaration
public const string XmlNamespace = "http://0install.de/schema/desktop-integration/app-list"
Field Value
Type | Description |
---|---|
String |
XsdLocation
The URI to retrieve an XSD containing the XML Schema information for this class in serialized form.
Declaration
public const string XsdLocation = "https://docs.0install.net/specifications/app-list.xsd"
Field Value
Type | Description |
---|---|
String |
XsiSchemaLocation
Provides XML Editors with location hints for XSD files.
Declaration
public string XsiSchemaLocation
Field Value
Type | Description |
---|---|
String |
Properties
Entries
A list of AppEntrys.
Declaration
public List<AppEntry> Entries { get; }
Property Value
Type | Description |
---|---|
List<AppEntry> |
Item[FeedUri]
Gets an AppEntry for a specific interface URI.
Declaration
public AppEntry this[FeedUri interfaceUri] { get; }
Parameters
Type | Name | Description |
---|---|---|
FeedUri | interfaceUri | The InterfaceUri to look for. |
Property Value
Type | Description |
---|---|
AppEntry | The first matching AppEntry. |
Exceptions
Type | Condition |
---|---|
KeyNotFoundException | No entry matching the interface URI was found. |
Methods
Clone()
Creates a deep copy of this AppList instance.
Declaration
public AppList Clone()
Returns
Type | Description |
---|---|
AppList | The new copy of the AppList. |
ContainsEntry(FeedUri)
Checks whether an AppEntry for a specific interface URI exists.
Declaration
public bool ContainsEntry(FeedUri interfaceUri)
Parameters
Type | Name | Description |
---|---|---|
FeedUri | interfaceUri | The InterfaceUri to look for. |
Returns
Type | Description |
---|---|
Boolean |
|
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Boolean |
Equals(AppList)
Declaration
public bool Equals(AppList other)
Parameters
Type | Name | Description |
---|---|---|
AppList | other |
Returns
Type | Description |
---|---|
Boolean |
FindAppAlias(String)
Retrieves a specific AppAlias.
Declaration
public Nullable<(AppAlias, AppEntry)> FindAppAlias(string aliasName)
Parameters
Type | Name | Description |
---|---|---|
String | aliasName | The name of the alias to search for. |
Returns
Type | Description |
---|---|
Nullable<(, )<AppAlias, AppEntry>> | The first AppAlias matching |
GetDefaultPath(Boolean)
Returns the default file path used to store the main AppList on this system.
Declaration
public static string GetDefaultPath(bool machineWide = false)
Parameters
Type | Name | Description |
---|---|---|
Boolean | machineWide | Store the AppList machine-wide instead of just for the current user. |
Returns
Type | Description |
---|---|
String |
GetEntry(FeedUri)
Gets an AppEntry for a specific interface URI. Safe for missing elements.
Declaration
public AppEntry GetEntry(FeedUri interfaceUri)
Parameters
Type | Name | Description |
---|---|---|
FeedUri | interfaceUri | The InterfaceUri to look for. |
Returns
Type | Description |
---|---|
AppEntry | The first matching AppEntry; |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Overrides
LoadSafe(Boolean)
Tries to load the AppList from its default location. Automatically falls back to an empty list on errors.
Declaration
public static AppList LoadSafe(bool machineWide = false)
Parameters
Type | Name | Description |
---|---|---|
Boolean | machineWide | Load the machine-wide AppList instead of the one for the current user. |
Returns
Type | Description |
---|---|
AppList | The loaded AppList. |
LoadXmlZip(Stream, String)
Loads a list from an XML file embedded in a ZIP archive.
Declaration
public static AppList LoadXmlZip(Stream stream, string password = null)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The ZIP archive to load. |
String | password | The password to use for decryption; |
Returns
Type | Description |
---|---|
AppList | The loaded list. |
Exceptions
Type | Condition |
---|---|
ICSharpCode.SharpZipLib.Zip.ZipException | A problem occurred while reading the ZIP data or |
InvalidDataException | A problem occurred while deserializing an XML file. |
ResolveAlias(String)
Retrieves the target URI of a specific AppAlias.
Declaration
public FeedUri ResolveAlias(string aliasName)
Parameters
Type | Name | Description |
---|---|---|
String | aliasName | The name of the alias to search for. |
Returns
Type | Description |
---|---|
FeedUri | The target feed of the alias; |
SaveXmlZip(Stream, String)
Saves the list in an XML file embedded in a ZIP archive.
Declaration
public void SaveXmlZip(Stream stream, string password = null)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The ZIP archive to be written. |
String | password | The password to use for encryption; |
Search(String)
Returns all AppEntrys that match a specific search query.
Declaration
public IEnumerable<AppEntry> Search(string query)
Parameters
Type | Name | Description |
---|---|---|
String | query | The search query. Must be contained within Name. |
Returns
Type | Description |
---|---|
IEnumerable<AppEntry> | All AppEntrys matching |
Operators
Equality(AppList, AppList)
Indicates whether the object on the left is equal to the object on the right.
Declaration
public static bool operator ==(AppList left, AppList right)
Parameters
Type | Name | Description |
---|---|---|
AppList | left | The left object |
AppList | right | The right object |
Returns
Type | Description |
---|---|
Boolean | true if the objects are equal; otherwise, false. |
Inequality(AppList, AppList)
Indicates whether the object on the left is not equal to the object on the right.
Declaration
public static bool operator !=(AppList left, AppList right)
Parameters
Type | Name | Description |
---|---|---|
AppList | left | The left object |
AppList | right | The right object |
Returns
Type | Description |
---|---|
Boolean | true if the objects are not equal; otherwise, false. |