Class Capability
A capability tells the desktop environment what an application can do and in which fashion this can be represented to the user.
Inherited Members
Namespace: ZeroInstall.Model.Capabilities
Assembly: ZeroInstall.Model.dll
Syntax
public abstract class Capability : XmlUnknown
Constructors
Capability()
Declaration
protected Capability()
Properties
ConflictIDs
Identifiers from a namespace global to all Capabilitys. Collisions in this namespace indicate that the concerned Capabilitys are in conflict cannot be registered on a single system at the same time.
Declaration
public abstract IEnumerable<string> ConflictIDs { get; }
Property Value
Type | Description |
---|---|
IEnumerable<String> |
Remarks
These identifiers are not guaranteed to stay the same between versions. They should not be stored in files but instead always generated on demand.
ID
An ID that differentiates this capability from other capabilities of the same type within the feed. May only contain alphanumeric characters, spaces ( ), dots (.), underscores (_), hyphens (-) and plus signs (+).
Declaration
public string ID { get; set; }
Property Value
Type | Description |
---|---|
String |
Remarks
Also serves as a programmatic identifier within the desktop environment. In case of conflicts, the first capability listed with a specific ID will take precedence.
WindowsMachineWideOnly
Indicates whether this capability can be registered only machine-wide and not per-user on Windows systems.
Declaration
public virtual bool WindowsMachineWideOnly { get; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
Clone()
Creates a deep copy of this Capability instance.
Declaration
public abstract Capability Clone()
Returns
Type | Description |
---|---|
Capability | The new copy of the Capability. |
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Boolean |
Equals(Capability)
Declaration
public bool Equals(Capability other)
Parameters
Type | Name | Description |
---|---|---|
Capability | other |
Returns
Type | Description |
---|---|
Boolean |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 |
Overrides
Normalize()
Converts legacy elements, sets default values, etc..
Declaration
public virtual void Normalize()
Exceptions
Type | Condition |
---|---|
InvalidDataException | A required property is not set or invalid. |
Operators
Equality(Capability, Capability)
Indicates whether the object on the left is equal to the object on the right.
Declaration
public static bool operator ==(Capability left, Capability right)
Parameters
Type | Name | Description |
---|---|---|
Capability | left | The left object |
Capability | right | The right object |
Returns
Type | Description |
---|---|
Boolean | true if the objects are equal; otherwise, false. |
Inequality(Capability, Capability)
Indicates whether the object on the left is not equal to the object on the right.
Declaration
public static bool operator !=(Capability left, Capability right)
Parameters
Type | Name | Description |
---|---|---|
Capability | left | The left object |
Capability | right | The right object |
Returns
Type | Description |
---|---|
Boolean | true if the objects are not equal; otherwise, false. |