Table of Contents

Class IconCapability

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

Abstract base class for capabilities that can have multiple Icons and descriptions.

[Serializable]
[Equatable]
public abstract class IconCapability : DefaultCapability, IEquatable<XmlUnknown>, ICloneable<Capability>, IEquatable<Capability>, IEquatable<DefaultCapability>, IIconContainer, IDescriptionContainer, IEquatable<IconCapability>
Inheritance
IconCapability
Implements
Derived
Inherited Members

Properties

Descriptions

Full descriptions for different languages, which can be several paragraphs long.

[Browsable(false)]
[OrderedEquality]
public LocalizableStringCollection Descriptions { get; }

Property Value

LocalizableStringCollection

Icons

Zero or more icons to represent the capability. Used for things like file icons.

[Browsable(false)]
[OrderedEquality]
public List<Icon> Icons { get; }

Property Value

List<Icon>

Methods

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(IconCapability?)

protected bool Equals(IconCapability? other)

Parameters

other IconCapability

Returns

bool

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

GetIcon(string)

Returns the first icon with a specific MIME type.

public Icon? GetIcon(string mimeType)

Parameters

mimeType string

The MimeType to try to find. Will only return exact matches.

Returns

Icon

The best matching icon that was found or null if no matching icon was found.

Operators

operator ==(IconCapability?, IconCapability?)

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

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

Parameters

left IconCapability

The left object

right IconCapability

The right object

Returns

bool

true if the objects are equal; otherwise, false.

operator !=(IconCapability?, IconCapability?)

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

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

Parameters

left IconCapability

The left object

right IconCapability

The right object

Returns

bool

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