Struct LeaderboardFieldSelection
An author-supplied, comma-separated, ordered selection of LeaderboardEntryField
values, parsed once at construction.
Assembly: Serenity.Leaderboard.Domain.dll
Syntax
public readonly struct LeaderboardFieldSelection : IEquatable<LeaderboardFieldSelection>
Remarks
Constructors
LeaderboardFieldSelection(string)
Creates a new LeaderboardFieldSelection by parsing commaSeparatedFields.
Declaration
public LeaderboardFieldSelection(string commaSeparatedFields)
Parameters
| Type |
Name |
Description |
| string |
commaSeparatedFields |
Comma-separated, case-insensitive field names, whitespace trimmed around each. Whitelist:
DisplayName, Value, Rank, Player, Metadata. An unknown name
or empty text makes the selection invalid instead of throwing.
|
Exceptions
Fields
FieldNames
The whitelisted field names, in the canonical order an authoring UI should offer them. Single
source of truth shared with the HUD Builder's option provider.
Declaration
public static readonly string[] FieldNames
Field Value
Fields
The parsed fields, in authored order. Empty when IsValid is false.
Declaration
public readonly IReadOnlyList<LeaderboardEntryField> Fields
Field Value
IsValid
Whether every authored name was recognized and at least one field was named.
Declaration
public readonly bool IsValid
Field Value
Value
The comma-separated text this selection was parsed from.
Declaration
public readonly string Value
Field Value
Methods
Equals(LeaderboardFieldSelection)
Ordinal equality over the raw authored text, mirroring BoardId — intentional
raw-text equality, not semantic field-set equality. Two selections with identical parsed
Fields but differently-cased or differently-spaced authored text (e.g.
"Rank,DisplayName" vs "rank, displayname") are NOT equal.
Declaration
public bool Equals(LeaderboardFieldSelection other)
Parameters
Returns
Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
|
Returns
Overrides
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
ToString()
Declaration
public override string ToString()
Returns
Overrides
Operators
operator ==(LeaderboardFieldSelection, LeaderboardFieldSelection)
Declaration
public static bool operator ==(LeaderboardFieldSelection left, LeaderboardFieldSelection right)
Parameters
Returns
operator !=(LeaderboardFieldSelection, LeaderboardFieldSelection)
Declaration
public static bool operator !=(LeaderboardFieldSelection left, LeaderboardFieldSelection right)
Parameters
Returns
Implements