Show / Hide Table of Contents

Class Category

An application category (e.g. Game or Office). Used for organizing application menus.

Inheritance
Object
XmlUnknown
FeedElement
Category
Implements
IEquatable<XmlUnknown>
IEquatable<FeedElement>
ICloneable<Category>
IEquatable<Category>
Inherited Members
FeedElement.FilterMismatch<T>(T)
FeedElement.FilterMismatch(IRecipeStep)
FeedElement.Equals(FeedElement)
FeedElement.IfZeroInstallVersion
FeedElement.IfZeroInstallVersionString
XmlUnknown.UnknownAttributes
XmlUnknown.UnknownElements
XmlUnknown.EnsureAttribute(Object, String)
XmlUnknown.EnsureAttributeSafeID(String, String)
XmlUnknown.ToShortXml()
XmlUnknown.Equals(XmlUnknown)
Namespace: ZeroInstall.Model
Assembly: ZeroInstall.Model.dll
Syntax
public sealed class Category : FeedElement

Constructors

Category()

Declaration
public Category()

Fields

WellKnownNames

Well-known values for Name if TypeNamespace is empty.

Declaration
public static readonly string[] WellKnownNames
Field Value
Type Description
String[]

Properties

Name

The category name as specified by the TypeNamespace.

Declaration
public string Name { get; set; }
Property Value
Type Description
String

TypeNamespace

If no type is given, then the category is one of the 'Main' categories defined by the freedesktop.org menu specification (http://standards.freedesktop.org/menu-spec/latest/apa.html). Otherwise, it is a URI giving the namespace for the category.

Declaration
public string TypeNamespace { get; set; }
Property Value
Type Description
String

Methods

Clone()

Creates a plain copy of this category.

Declaration
public Category Clone()
Returns
Type Description
Category

The cloned category.

Equals(Object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
Object obj
Returns
Type Description
Boolean
Overrides
FeedElement.Equals(Object)

Equals(Category)

Declaration
public bool Equals(Category other)
Parameters
Type Name Description
Category other
Returns
Type Description
Boolean

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
Int32
Overrides
FeedElement.GetHashCode()

ToString()

Returns Name directly. Safe for parsing!

Declaration
public override string ToString()
Returns
Type Description
String

Operators

Equality(Category, Category)

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

Declaration
public static bool operator ==(Category left, Category right)
Parameters
Type Name Description
Category left

The left object

Category right

The right object

Returns
Type Description
Boolean

true if the objects are equal; otherwise, false.

Implicit(String to Category)

Convenience cast for turning strings into Categorys.

Declaration
public static implicit operator Category(string value)
Parameters
Type Name Description
String value
Returns
Type Description
Category

Inequality(Category, Category)

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

Declaration
public static bool operator !=(Category left, Category right)
Parameters
Type Name Description
Category left

The left object

Category right

The right object

Returns
Type Description
Boolean

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

Implements

System.IEquatable<T>
System.IEquatable<T>
ICloneable<T>
System.IEquatable<T>
In This Article
Back to top Copyright Bastian Eicher et al