Microsoft.Bot.Builder.Internals.Scorables.IScorable< in in Item, out out Score > Interface Template Reference

Allow the scoring of items, with external comparison of scores, and enable the winner to take some action. More...

Public Member Functions

Task DoneAsync (Item item, object state, CancellationToken token)
 The scoring process has completed - dispose of any scoped resources. More...
 
Score GetScore (Item item, object state)
 Gets the score for this item. More...
 
bool HasScore (Item item, object state)
 Returns whether this scorable wants to participate in scoring this item. More...
 
Task PostAsync (Item item, object state, CancellationToken token)
 If this scorable wins, this method is called. More...
 
Task< object > PrepareAsync (Item item, CancellationToken token)
 Perform some asynchronous work to analyze the item and produce some opaque state. More...
 

Detailed Description

Allow the scoring of items, with external comparison of scores, and enable the winner to take some action.

We avoided the traditional "bool TryScore(Item item, object state, out Score score)" pattern to allow for Score generic type parameter covariance.

Definition at line 50 of file Scorable.cs.

Member Function Documentation

Task Microsoft.Bot.Builder.Internals.Scorables.IScorable< in in Item, out out Score >.DoneAsync ( Item  item,
object  state,
CancellationToken  token 
)

The scoring process has completed - dispose of any scoped resources.

Score Microsoft.Bot.Builder.Internals.Scorables.IScorable< in in Item, out out Score >.GetScore ( Item  item,
object  state 
)

Gets the score for this item.

bool Microsoft.Bot.Builder.Internals.Scorables.IScorable< in in Item, out out Score >.HasScore ( Item  item,
object  state 
)

Returns whether this scorable wants to participate in scoring this item.

Task Microsoft.Bot.Builder.Internals.Scorables.IScorable< in in Item, out out Score >.PostAsync ( Item  item,
object  state,
CancellationToken  token 
)

If this scorable wins, this method is called.

Task<object> Microsoft.Bot.Builder.Internals.Scorables.IScorable< in in Item, out out Score >.PrepareAsync ( Item  item,
CancellationToken  token 
)

Perform some asynchronous work to analyze the item and produce some opaque state.


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