Microsoft.Bot.Builder.Scorables.Internals.FoldScorable< Item, Score > Class Template Referenceabstract

Fold an aggregation of scorables to produce a winning scorable. More...

Inheritance diagram for Microsoft.Bot.Builder.Scorables.Internals.FoldScorable< Item, Score >:

Classes

struct  State
 Per-scorable opaque state used during scoring process. More...
 

Public Member Functions

 FoldScorable (IComparer< Score > comparer, IEnumerable< IScorable< Item, Score >> scorables)
 
delegate bool OnStageDelegate (FoldStage stage, IScorable< Item, Score > scorable, Item item, object state, Score score)
 Event handler delegate for fold scorable stages. More...
 

Protected Member Functions

abstract Task DoneAsync (Item item, State state, CancellationToken token)
 
override async Task DoneAsync (Item item, IReadOnlyList< State > states, CancellationToken token)
 
abstract Score GetScore (Item item, State state)
 
override Score GetScore (Item item, IReadOnlyList< State > states)
 
abstract bool HasScore (Item item, State state)
 
override bool HasScore (Item item, IReadOnlyList< State > states)
 
abstract Task PostAsync (Item item, State state, CancellationToken token)
 
override async Task PostAsync (Item item, IReadOnlyList< State > states, CancellationToken token)
 
override async Task< IReadOnlyList< State > > PrepareAsync (Item item, CancellationToken token)
 

Protected Attributes

readonly IComparer< Score > comparer
 
readonly IEnumerable< IScorable< Item, Score > > scorables
 

Properties

abstract OnStageDelegate OnStage [get]
 Event handler for fold scorable stages. More...
 

Detailed Description

Fold an aggregation of scorables to produce a winning scorable.

Fold aka "reduce, accumulate, aggregate, compress, or inject" https://en.wikipedia.org/wiki/Fold_(higher-order_function)

Definition at line 72 of file FoldScorable.cs.

Constructor & Destructor Documentation

Microsoft.Bot.Builder.Scorables.Internals.FoldScorable< Item, Score >.FoldScorable ( IComparer< Score >  comparer,
IEnumerable< IScorable< Item, Score >>  scorables 
)
inline

Definition at line 82 of file FoldScorable.cs.

Member Function Documentation

abstract Task Microsoft.Bot.Builder.Scorables.Internals.ScorableBase< Item, State, Score >.DoneAsync ( Item  item,
State  state,
CancellationToken  token 
)
protectedpure virtualinherited
override async Task Microsoft.Bot.Builder.Scorables.Internals.FoldScorable< Item, Score >.DoneAsync ( Item  item,
IReadOnlyList< State states,
CancellationToken  token 
)
inlineprotected

Definition at line 205 of file FoldScorable.cs.

abstract Score Microsoft.Bot.Builder.Scorables.Internals.ScorableBase< Item, State, Score >.GetScore ( Item  item,
State  state 
)
protectedpure virtualinherited
override Score Microsoft.Bot.Builder.Scorables.Internals.FoldScorable< Item, Score >.GetScore ( Item  item,
IReadOnlyList< State states 
)
inlineprotected

Definition at line 174 of file FoldScorable.cs.

abstract bool Microsoft.Bot.Builder.Scorables.Internals.ScorableBase< Item, State, Score >.HasScore ( Item  item,
State  state 
)
protectedpure virtualinherited
override bool Microsoft.Bot.Builder.Scorables.Internals.FoldScorable< Item, Score >.HasScore ( Item  item,
IReadOnlyList< State states 
)
inlineprotected

Definition at line 163 of file FoldScorable.cs.

delegate bool Microsoft.Bot.Builder.Scorables.Internals.FoldScorable< Item, Score >.OnStageDelegate ( FoldStage  stage,
IScorable< Item, Score >  scorable,
Item  item,
object  state,
Score  score 
)

Event handler delegate for fold scorable stages.

abstract Task Microsoft.Bot.Builder.Scorables.Internals.ScorableBase< Item, State, Score >.PostAsync ( Item  item,
State  state,
CancellationToken  token 
)
protectedpure virtualinherited
override async Task Microsoft.Bot.Builder.Scorables.Internals.FoldScorable< Item, Score >.PostAsync ( Item  item,
IReadOnlyList< State states,
CancellationToken  token 
)
inlineprotected

Definition at line 180 of file FoldScorable.cs.

override async Task<IReadOnlyList<State> > Microsoft.Bot.Builder.Scorables.Internals.FoldScorable< Item, Score >.PrepareAsync ( Item  item,
CancellationToken  token 
)
inlineprotectedvirtual

Member Data Documentation

readonly IComparer<Score> Microsoft.Bot.Builder.Scorables.Internals.FoldScorable< Item, Score >.comparer
protected

Definition at line 79 of file FoldScorable.cs.

readonly IEnumerable<IScorable<Item, Score> > Microsoft.Bot.Builder.Scorables.Internals.FoldScorable< Item, Score >.scorables
protected

Definition at line 80 of file FoldScorable.cs.

Property Documentation

abstract OnStageDelegate Microsoft.Bot.Builder.Scorables.Internals.FoldScorable< Item, Score >.OnStage
getprotected

Event handler for fold scorable stages.

This is late-bound to allow binding to "this" in derived classes.

Definition at line 94 of file FoldScorable.cs.


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