Selector

References
public sealed class Selector : IEquatable<Selector>
Selector pattern for chapters, sections or items.

Constructors

Selector

#
public Selector(params Guid[] guids)
Create a new selector pattern based on a list of guids.
guids (params Guid[])

Selector

#
public Selector(string chapter, string section, string item, int slot, Rank? rank)
Create a new selector pattern.
chapter (string)
section (string)
item (string)
slot (int)
rank (Rank?)

Fields

BeginBlock

#
public const char BeginBlock = '{'
Gets the symbol which starts a selector pattern with potential spaces.

EndBlock

#
public const char EndBlock = '}'
Gets the symbol which terminates a selector pattern.

Properties

Any

#
public static Selector Any { get; }
Gets the selector for all proxies.

AnyChapter

#
public bool AnyChapter { get; }
Gets whether the chapter has been defined.

AnyItem

#
public bool AnyItem { get; }
Gets whether the item name has been defined.

AnyRank

#
public bool AnyRank { get; }
Gets whether the rank has been defined.

AnySection

#
public bool AnySection { get; }
Gets whether the section has been defined.

AnySlot

#
public bool AnySlot { get; }
Gets whether the slot has been defined.

Chapter

#
public string Chapter { get; }
Chapter wildcard pattern.

Empty

#
public bool Empty { get; }
Gets whether this selector has any constraints at all.

Item

#
public string Item { get; }
Item name wildcard pattern.

OnlyChapters

#
public bool OnlyChapters { get; }
Gets whether this selector only applies to chapters.

OnlySections

#
public bool OnlySections { get; }
Gets whether this selector only applies to specific chapter+section pairs.

Rank

#
public Rank? Rank { get; }
Gets the rank identifier, if any.

Section

#
public string Section { get; }
Section wildcard pattern.

Slot

#
public int Slot { get; }
Gets the slot identifier. Negative values indicate wildcards.

WildChapters

#
public bool WildChapters { get; }
Gets whether the chapter has been partially defined.

WildItems

#
public bool WildItems { get; }
Gets whether the name has been partially defined.

WildSections

#
public bool WildSections { get; }
Gets whether the section has been partially defined.

Methods

Equals

#
public bool Equals(Selector other)
other (Selector)

FromChapter

#
public static Selector FromChapter(string chapter)
Create a selector for a specific chapter.
chapter (string)chapter pattern.

FromIds

#
public static Selector FromIds(string list)
Create a selector from one or more space or comma separated guids.
list (string)String containing guids.
Selector for Guids, or null if the string is not a valid guid list.

FromItem

#
public static Selector FromItem(string chapter, string section, string item, int slot = -1, Rank? rank = null)
Create a selector for a specific chapter+section+Slot+Item.
chapter (string)Chapter pattern.
section (string)Section pattern.
item (string)Item pattern.
slot (int = -1)Slot index.
rank (Rank? = null)Rank.

FromNomen

#
public static Selector FromNomen(Nomen nomen)
Create a selector from a Nomen.
nomen (Nomen)

FromSection

#
public static Selector FromSection(string chapter, string section)
Create a selector for a specific chapter+section.
chapter (string)Chapter pattern.
section (string)Section pattern.

Replace

#
public static Nomen Replace(Selector pattern, Nomen source)
Replace the (partially) undefined portions of a selector with the appropriate fields from a Nomen.
pattern (Selector)
source (Nomen)

ToString

#
public override string ToString()
Returns a string that represents the current object.
A string that represents the current object.
Object.ToString

TryParse

#
public static Selector TryParse(string pattern)
Try and parse a selector format string.
pattern (string)