Zero Install .NET API 2.20.0
ZeroInstall.Model.Icon Class Reference

An icon representing the application. Used in the Catalog GUI as well as for desktop icons, menu entries, etc.. More...

Inheritance diagram for ZeroInstall.Model.Icon:
ZeroInstall.Model.FeedElement NanoByte.Common.ICloneable< Icon > ZeroInstall.Model.XmlUnknown

Public Member Functions

void Normalize ()
 Converts legacy elements, sets default values, etc.. More...
 
override string ToString ()
 Returns the icon in the form "Location (MimeType)". Not safe for parsing!
 
Icon Clone ()
 Creates a deep copy of this Icon instance. More...
 
bool Equals (Icon? other)
 
override bool Equals (object? obj)
 
override int GetHashCode ()
 
- Public Member Functions inherited from ZeroInstall.Model.FeedElement
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< Icon >
Icon Clone ()
 

Static Public Attributes

const string MimeTypePng = "image/png"
 The MimeType value for PNG icons.
 
const string MimeTypeIco = "image/vnd.microsoft.icon"
 The MimeType value for Windows ICO icons.
 
const string MimeTypeSvg = "image/svg"
 The MimeType value for SVG icons.
 
static readonly string[] KnownMimeTypes = {MimeTypePng, MimeTypeIco, MimeTypeSvg}
 All known MimeType values for icons.
 

Properties

Uri Href = default! [getset]
 The URL used to locate the icon.
 
string? HrefString [getset]
 Used for XML serialization and PropertyGrid. More...
 
string? MimeType [getset]
 The MIME type of the icon. This value is case-insensitive.
 
- Properties inherited from ZeroInstall.Model.FeedElement
VersionRangeIfZeroInstallVersion [getset]
 Only process this element if the current Zero Install version matches the range.
 
string??? IfZeroInstallVersionString [getset]
 Used for XML serialization. More...
 

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.FeedElement
bool Equals (FeedElement? other)
 
- 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)
 
- Static Protected Member Functions inherited from ZeroInstall.Model.FeedElement
static bool FilterMismatch (IRecipeStep step)
 Checks whether an element passes the specified IfZeroInstallVersion restriction, if any.
 
- Static Package Functions inherited from ZeroInstall.Model.FeedElement
static bool FilterMismatch< T > (T element)
 Checks whether an element passes the specified IfZeroInstallVersion restriction, if any. More...
 

Detailed Description

An icon representing the application. Used in the Catalog GUI as well as for desktop icons, menu entries, etc..

See also
Feed.Icons, EntryPoint.Icons

Member Function Documentation

◆ Clone()

Icon ZeroInstall.Model.Icon.Clone ( )

Creates a deep copy of this Icon instance.

Returns
The new copy of the Icon.

◆ Normalize()

void ZeroInstall.Model.Icon.Normalize ( )

Converts legacy elements, sets default values, etc..

Exceptions
InvalidDataExceptionA required property is not set or invalid.

Property Documentation

◆ HrefString

string? ZeroInstall.Model.Icon.HrefString
getset

Used for XML serialization and PropertyGrid.

See also
Href

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