Able
Askowl Base Library Enabler
Askowl.Selector< T > Class Template Reference

Pick one item from a list. More...

Inheritance diagram for Askowl.Selector< T >:
Askowl.Pick< T >

Public Member Functions

Pick ()
 Method called to pick an item More...
 
Next ()
 Called when a pick fails and we need to try something else //#TBD#// More...
 
void Top ()
  //#TBD#// More...
 
void Reset ()
 Remove all choices for an empty list More...
 
- Public Member Functions inherited from Askowl.Pick< T >
Pick ()
 Method to call to return the selection More...
 

Public Attributes

bool IsRandom = true
 Defaults to random. Set false to cycle through entries sequentially More...
 
int ExhaustiveBelow = 1
 If the list is shorter then select items randomly, but never choose one a second time until all have been picked. This is useful for short lists to reduce repeats. More...
 
int CycleIndex => cycleIndex % choices.Length
 The location of the next choice in the sequence. More...
 

Properties

T [] Choices [get, set]
 Used to update the choices to a new set using the same picker. More...
 

Detailed Description

Pick one item from a list.

Definition at line 10 of file Selector.cs.

Member Function Documentation

◆ Next()

T Askowl.Selector< T >.Next ( )

◆ Pick()

T Askowl.Selector< T >.Pick ( )

Method called to pick an item

Definition at line 21 of file Selector.cs.

◆ Reset()

◆ Top()

void Askowl.Selector< T >.Top ( )

//#TBD#//

Member Data Documentation

◆ CycleIndex

int Askowl.Selector< T >.CycleIndex => cycleIndex % choices.Length

◆ ExhaustiveBelow

◆ IsRandom

Property Documentation

◆ Choices


The documentation for this class was generated from the following file: