Class Category
An application category (e.g. Game or Office). Used for organizing application menus.
Inherited Members
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
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
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. |