Zero Install .NET API 2.20.0
ZeroInstall.Model.Capabilities.CapabilityList Class Reference

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

Inheritance diagram for ZeroInstall.Model.Capabilities.CapabilityList:
ZeroInstall.Model.XmlUnknown NanoByte.Common.ICloneable< CapabilityList >

Public Member Functions

T? GetCapability< T > (string id)
 Retrieves the first Capability that matches a specific type and ID. Safe for missing elements. More...
 
CapabilityList Clone ()
 Creates a deep copy of this CapabilityList instance. More...
 
override string ToString ()
 Returns the capability list in the form "OS". Not safe for parsing!
 
bool Equals (CapabilityList? other)
 
override bool Equals (object? obj)
 
override int GetHashCode ()
 
- Public Member Functions inherited from ZeroInstall.Model.XmlUnknown
string ToShortXml ()
 Returns a shortened XML representation (with attributes but without child elements). More...
 
override int GetHashCode ()
 
- Public Member Functions inherited from NanoByte.Common.ICloneable< CapabilityList >
CapabilityList Clone ()
 

Static Public Attributes

const string XmlNamespace = "http://0install.de/schema/desktop-integration/capabilities"
 The XML namespace used for storing application capabilities.
 
const string XsdLocation = "https://docs.0install.net/specifications/capabilities.xsd"
 The URI to retrieve an XSD containing the XML Schema information for this class in serialized form.
 

Properties

OS OS [getset]
 Determines for which operating system the Capabilitys are applicable.
 
List< CapabilityEntries = new() [get]
 A list of Capabilitys.
 

Additional Inherited Members

- Public Attributes inherited from ZeroInstall.Model.XmlUnknown
XmlAttribute?[] UnknownAttributes
 Contains any unknown additional XML attributes.
 
XmlElement?[] UnknownElements
 Contains any unknown additional XML elements.
 
- Protected Member Functions inherited from ZeroInstall.Model.XmlUnknown
void EnsureAttribute (object? value, string attributeName)
 Ensures that a value deserialized from an XML attribute is set (not null). More...
 
void EnsureAttributeSafeID (string? value, string attributeName)
 Ensures that a value deserialized from an XML attribute is set (not null) and only contains alphanumeric characters, spaces ( ), dots (.), underscores (_), hyphens (-) and plus signs (+). More...
 
bool Equals (XmlUnknown? other)
 

Detailed Description

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

Member Function Documentation

◆ Clone()

CapabilityList ZeroInstall.Model.Capabilities.CapabilityList.Clone ( )
inline

Creates a deep copy of this CapabilityList instance.

Returns
The new copy of the CapabilityList.

◆ GetCapability< T >()

T? ZeroInstall.Model.Capabilities.CapabilityList.GetCapability< T > ( string  id)
inline

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

Template Parameters
TThe capability type to match.
Parameters
idThe Capability.ID to match.
Returns
The first matching Capability; null if no match was found.
Exceptions
KeyNotFoundExceptionNo capability matching id and T was found.
Type Constraints
T :Capability 

The documentation for this class was generated from the following file: