Jaa


FoldScorable<Item,Score> Class

Definition

Fold an aggregation of scorables to produce a winning scorable.

public abstract class FoldScorable<Item,Score> : Microsoft.Bot.Builder.Scorables.Internals.ScorableBase<Item,System.Collections.Generic.IReadOnlyList<Microsoft.Bot.Builder.Scorables.Internals.FoldScorable<Item,Score>.State>,Score>
type FoldScorable<'Item, 'Score> = class
    inherit ScorableBase<'Item, IReadOnlyList<FoldScorable<'Item, 'Score>.State>, 'Score>
Public MustInherit Class FoldScorable(Of Item, Score)
Inherits ScorableBase(Of Item, IReadOnlyList(Of FoldScorable(Of Item, Score).State), Score)

Type Parameters

Item
Score
Inheritance
ScorableBase<Item,IReadOnlyList<FoldScorable<Item,Score>.State>,Score>
FoldScorable<Item,Score>
Derived

Remarks

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

Constructors

FoldScorable<Item,Score>(IComparer<Score>, IEnumerable<IScorable<Item,Score>>)

Fields

comparer
scorables

Properties

OnStage

Event handler for fold scorable stages.

Methods

DoneAsync(Item, IReadOnlyList<FoldScorable<Item,Score>.State>, CancellationToken)
DoneAsync(Item, State, CancellationToken) (Inherited from ScorableBase<Item,State,Score>)
GetScore(Item, IReadOnlyList<FoldScorable<Item,Score>.State>)
GetScore(Item, State) (Inherited from ScorableBase<Item,State,Score>)
HasScore(Item, IReadOnlyList<FoldScorable<Item,Score>.State>)
HasScore(Item, State) (Inherited from ScorableBase<Item,State,Score>)
PostAsync(Item, IReadOnlyList<FoldScorable<Item,Score>.State>, CancellationToken)
PostAsync(Item, State, CancellationToken) (Inherited from ScorableBase<Item,State,Score>)
PrepareAsync(Item, CancellationToken)

Explicit Interface Implementations

IScorable<Item,Score>.DoneAsync(Item, Object, CancellationToken) (Inherited from ScorableBase<Item,State,Score>)
IScorable<Item,Score>.GetScore(Item, Object) (Inherited from ScorableBase<Item,State,Score>)
IScorable<Item,Score>.HasScore(Item, Object) (Inherited from ScorableBase<Item,State,Score>)
IScorable<Item,Score>.PostAsync(Item, Object, CancellationToken) (Inherited from ScorableBase<Item,State,Score>)
IScorable<Item,Score>.PrepareAsync(Item, CancellationToken) (Inherited from ScorableBase<Item,State,Score>)

Extension Methods

SelectItem<SourceItem,TargetItem,Score>(IScorable<TargetItem,Score>, Func<SourceItem,TargetItem>)

Project the item of a scorable using a lambda expression.

SelectScore<Item,SourceScore,TargetScore>(IScorable<Item,SourceScore>, Func<Item,SourceScore,TargetScore>)

Project the score of a scorable using a lambda expression.

TryPostAsync<Item,Score>(IScorable<Item,Score>, Item, CancellationToken)

Invoke the scorable calling protocol against a single scorable.

WhereScore<Item,Score>(IScorable<Item,Score>, Func<Item,Score,Boolean>)

Applies to