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.
[Serializable]
[Equatable]
public sealed class CapabilityList : XmlUnknown, IEquatable<XmlUnknown>, ICloneable<CapabilityList>, IEquatable<CapabilityList>
- Inheritance
-
CapabilityList
- Implements
- Inherited Members
Fields
XmlNamespace
The XML namespace used for storing application capabilities.
public const string XmlNamespace = "http://0install.de/schema/desktop-integration/capabilities"
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/capabilities.xsd"
Field Value
Properties
Entries
A list of Capabilitys.
[Browsable(false)]
[OrderedEquality]
public List<Capability> Entries { get; }
Property Value
OS
Determines for which operating system the Capabilitys are applicable.
public OS OS { get; set; }
Property Value
Methods
Clone()
Creates a deep copy of this CapabilityList instance.
public CapabilityList Clone()
Returns
- CapabilityList
The new copy of the CapabilityList.
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current object.
Returns
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
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
andT
was found.
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
ToString()
Returns the capability list in the form "OS". Not safe for parsing!
public override string ToString()
Returns
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
CapabilityListThe left object
right
CapabilityListThe 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
CapabilityListThe left object
right
CapabilityListThe right object
Returns
- bool
true if the objects are not equal; otherwise, false.