Nomen
References[IoId("00000000-0e65-44e3-a44e-f81c20ec53b1")]
public sealed class Nomen : IStorable, IEquatable<Nomen>, IComparable<Nomen>
Collates a set of descriptive properties of some entity. The Latinate archaic term 'nomen' was picked for this type since we needed both a short and otherwise unused name. Hence, 'Name', 'Id', 'Description', 'Label' or 'Tag' were not acceptable. Nomens will convert automatically from strings, provided they are formatted thusly: '[Chapter.[Section.]]Name[//Info]'
Constructors
Nomen
#Create a new description.
Parameters:
| name (string) | Object name. |
| info (string) | Info or description. |
| chapter (string = null) | Top-level category. |
| section (string = null) | Subcategory name. |
| slot (int = 0) | Integral grouping within section. |
| rank (Rank = Rank.Normal) | Standing of object. |
| sortKey (string = null) | Name override used when sorting in the UI. |
Properties
Rank
#Gets the importance of this object. The rank determines the order in which elements are dropped from the UI during layout.
Methods
Categorise<T>
#public static NomenChapter<T>[] Categorise<T>(IEnumerable<T> items, Func<T, Nomen> extractNomen, StringComparison comparison = StringComparison.OrdinalIgnoreCase)
Categorise a collection of values into chapter and section collections.
Parameters:
| items (IEnumerable<T>) | Value to categorise. |
| extractNomen (Func<T, Nomen>) | Method for extracting the nomen of an item. |
| comparison (StringComparison = StringComparison.OrdinalIgnoreCase) | Chapter and section string comparison to use. |
Equals
#Indicates whether the current object is equal to another object of the same type.
Parameters:
| other (Nomen) | An object to compare with this object. |
Equals
#Determines whether the specified object is equal to the current object.
Parameters:
| obj (object) | The object to compare with the current object. |
Returns: true if the specified object is equal to the current object; otherwise, false.
Overrides: Object.Equals
GetHashCode
#Serves as the hash function.
Returns: A hash code for the current object.
Overrides: Object.GetHashCode
MakeSearchable
#Create a searchable version of this nomen without off characters or meaningless words in the name and info.
ToString
#Returns a string that represents the current object.
Returns: A string that represents the current object.
Overrides: Object.ToString
Valence
#Compute the valence of this nomen with respect to a set of search terms.
Parameters:
| query (string[]) |
WithPosition
#Modify all positional aspects of this nomen.