Class Category
- Namespace
- ZeroInstall.Model
- Assembly
- ZeroInstall.Model.dll
An application category (e.g. Game or Office). Used for organizing application menus.
[Serializable]
[Equatable]
public sealed class Category : FeedElement, IEquatable<XmlUnknown>, IEquatable<FeedElement>, ICloneable<Category>, IEquatable<Category>
- Inheritance
-
Category
- Implements
- Inherited Members
Fields
WellKnownNames
Well-known values for Name if TypeNamespace is empty.
public static readonly string[] WellKnownNames
Field Value
- string[]
Properties
Name
The category name as specified by the TypeNamespace.
[TypeConverter(typeof(CategoryNameConverter))]
public string? Name { get; set; }
Property Value
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.
public string? TypeNamespace { get; set; }
Property Value
Methods
Clone()
Creates a plain copy of this category.
public Category Clone()
Returns
- Category
The cloned category.
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
ToString()
Returns Name directly. Safe for parsing!
public override string ToString()
Returns
Operators
operator ==(Category?, Category?)
Indicates whether the object on the left is equal to the object on the right.
public static bool operator ==(Category? left, Category? right)
Parameters
Returns
- bool
true if the objects are equal; otherwise, false.
implicit operator Category(string)
Convenience cast for turning strings into Categorys.
public static implicit operator Category(string value)
Parameters
value
string
Returns
operator !=(Category?, Category?)
Indicates whether the object on the left is not equal to the object on the right.
public static bool operator !=(Category? left, Category? right)
Parameters
Returns
- bool
true if the objects are not equal; otherwise, false.