Table of Contents

Class Capability

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

A capability tells the desktop environment what an application can do and in which fashion this can be represented to the user.

[Equatable]
public abstract class Capability : XmlUnknown, IEquatable<XmlUnknown>, ICloneable<Capability>, IEquatable<Capability>
Inheritance
Capability
Implements
Derived
Inherited Members

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.

[Browsable(false)]
[IgnoreEquality]
public abstract IEnumerable<string> ConflictIDs { get; }

Property Value

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 (+).

public required string ID { get; set; }

Property Value

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.

[Browsable(false)]
[IgnoreEquality]
public virtual bool WindowsMachineWideOnly { get; }

Property Value

bool

Methods

Clone()

Creates a deep copy of this Capability instance.

public abstract Capability Clone()

Returns

Capability

The new copy of the Capability.

Equals(object?)

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Equals(Capability?)

protected bool Equals(Capability? other)

Parameters

other Capability

Returns

bool

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

Normalize()

Converts legacy elements, sets default values, etc..

public virtual void Normalize()

Exceptions

InvalidDataException

A required property is not set or invalid.

Operators

operator ==(Capability?, Capability?)

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

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

Parameters

left Capability

The left object

right Capability

The right object

Returns

bool

true if the objects are equal; otherwise, false.

operator !=(Capability?, Capability?)

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

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

Parameters

left Capability

The left object

right Capability

The right object

Returns

bool

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