Table of Contents

Class CapabilityList

Namespace
ZeroInstall.Model.Capabilities
Assembly
ZeroInstall.Model.dll

Groups a number of application Capabilitys (for a specific operating system) that can be registered in a desktop environment.

public sealed class CapabilityList : XmlUnknown, ICloneable<CapabilityList>, IEquatable<CapabilityList>
Inheritance
object
CapabilityList
Implements
Inherited Members

Constructors

CapabilityList()

public CapabilityList()

Fields

XmlNamespace

The XML namespace used for storing application capabilities.

public const string XmlNamespace = "http://0install.de/schema/desktop-integration/capabilities"

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/capabilities.xsd"

Field Value

string

Properties

Entries

A list of Capabilitys.

[Browsable(false)]
public List<Capability> Entries { get; }

Property Value

List<Capability>

OS

Determines for which operating system the Capabilitys are applicable.

public OS OS { get; set; }

Property Value

OS

Methods

Clone()

Creates a deep copy of this CapabilityList instance.

public CapabilityList Clone()

Returns

CapabilityList

The new copy of the CapabilityList.

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetCapability<T>(string)

Retrieves the first Capability that matches a specific type and ID. Safe for missing elements.

public T? GetCapability<T>(string id) where T : Capability

Parameters

id string

The ID to match.

Returns

T

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

Type Parameters

T

The capability type to match.

Exceptions

KeyNotFoundException

No capability matching id and T was found.

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

Returns the capability list in the form "OS". Not safe for parsing!

public override string ToString()

Returns

string

Operators

operator ==(CapabilityList?, CapabilityList?)

Indicates whether the object on the left is equal to the object on the right.

public static bool operator ==(CapabilityList? left, CapabilityList? right)

Parameters

left CapabilityList

The left object

right CapabilityList

The right object

Returns

bool

true if the objects are equal; otherwise, false.

operator !=(CapabilityList?, CapabilityList?)

Indicates whether the object on the left is not equal to the object on the right.

public static bool operator !=(CapabilityList? left, CapabilityList? right)

Parameters

left CapabilityList

The left object

right CapabilityList

The right object

Returns

bool

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