Class Icon
An icon representing the application. Used in the Catalog GUI as well as for desktop icons, menu entries, etc..
Inherited Members
Namespace: ZeroInstall.Model
Assembly: ZeroInstall.Model.dll
Syntax
public class Icon : FeedElement
Constructors
Icon()
Declaration
public Icon()
Fields
KnownMimeTypes
All known MimeType values for icons.
Declaration
public static readonly string[] KnownMimeTypes
Field Value
Type | Description |
---|---|
String[] |
MimeTypeIcns
The MimeType value for Apple icons (.icns).
Declaration
public const string MimeTypeIcns = "image/x-icns"
Field Value
Type | Description |
---|---|
String |
MimeTypeIco
The MimeType value for Windows icons (.ico).
Declaration
public const string MimeTypeIco = "image/vnd.microsoft.icon"
Field Value
Type | Description |
---|---|
String |
MimeTypePng
The MimeType value for PNG icons (.png(.
Declaration
public const string MimeTypePng = "image/png"
Field Value
Type | Description |
---|---|
String |
MimeTypeSvg
The MimeType value for SVG icons (.svg).
Declaration
public const string MimeTypeSvg = "image/svg"
Field Value
Type | Description |
---|---|
String |
Properties
Href
The URL used to locate the icon.
Declaration
public Uri Href { get; set; }
Property Value
Type | Description |
---|---|
Uri |
HrefString
Used for XML serialization and PropertyGrid.
Declaration
public string HrefString { get; set; }
Property Value
Type | Description |
---|---|
String |
See Also
MimeType
The MIME type of the icon. This value is case-insensitive.
Declaration
public string MimeType { get; set; }
Property Value
Type | Description |
---|---|
String |
Methods
Clone()
Creates a deep copy of this Icon instance.
Declaration
public Icon Clone()
Returns
Type | Description |
---|---|
Icon | The new copy of the Icon. |
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Boolean |
Overrides
Equals(Icon)
Declaration
public bool Equals(Icon other)
Parameters
Type | Name | Description |
---|---|---|
Icon | 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 void Normalize()
Exceptions
Type | Condition |
---|---|
InvalidDataException | A required property is not set or invalid. |
ToString()
Returns the icon in the form "Location (MimeType)". Not safe for parsing!
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |
Operators
Equality(Icon, Icon)
Indicates whether the object on the left is equal to the object on the right.
Declaration
public static bool operator ==(Icon left, Icon right)
Parameters
Type | Name | Description |
---|---|---|
Icon | left | The left object |
Icon | right | The right object |
Returns
Type | Description |
---|---|
Boolean | true if the objects are equal; otherwise, false. |
Inequality(Icon, Icon)
Indicates whether the object on the left is not equal to the object on the right.
Declaration
public static bool operator !=(Icon left, Icon right)
Parameters
Type | Name | Description |
---|---|---|
Icon | left | The left object |
Icon | right | The right object |
Returns
Type | Description |
---|---|
Boolean | true if the objects are not equal; otherwise, false. |