Chain Chain Chain Class

Definition

A fluent, chainable interface for IDialogs.

public static class Chain
type Chain = class
Public Module Chain
Inheritance
ChainChainChain

Methods

Case<R>(Regex, ContextualSelector<String,R>) Case<R>(Regex, ContextualSelector<String,R>) Case<R>(Regex, ContextualSelector<String,R>)

Constructs a case based on a regular expression.

Case<T,R>(Func<T,Boolean>, ContextualSelector<T,R>) Case<T,R>(Func<T,Boolean>, ContextualSelector<T,R>) Case<T,R>(Func<T,Boolean>, ContextualSelector<T,R>)

Constructs a case.

Catch<T,E>(IDialog<T>, Func<IDialog<T>,E,IDialog<T>>) Catch<T,E>(IDialog<T>, Func<IDialog<T>,E,IDialog<T>>) Catch<T,E>(IDialog<T>, Func<IDialog<T>,E,IDialog<T>>)

When the antecedent IDialog<TResult> has completed, catch and handle any exceptions of type E.

Catch<T>(IDialog<T>, Func<IDialog<T>,Exception,IDialog<T>>) Catch<T>(IDialog<T>, Func<IDialog<T>,Exception,IDialog<T>>) Catch<T>(IDialog<T>, Func<IDialog<T>,Exception,IDialog<T>>)

When the antecedent IDialog<TResult> has completed, catch and handle any exceptions.

ContinueWith<T,R>(IDialog<T>, Chain) ContinueWith<T,R>(IDialog<T>, Chain) ContinueWith<T,R>(IDialog<T>, Chain)

When the antecedent IDialog<TResult> has completed, execute the continuation to produce the next IDialog<TResult>.

Default<T,R>(ContextualSelector<T,R>) Default<T,R>(ContextualSelector<T,R>) Default<T,R>(ContextualSelector<T,R>)

Constructs a case to use as the default.

DefaultIfException<T,E>(IDialog<T>) DefaultIfException<T,E>(IDialog<T>) DefaultIfException<T,E>(IDialog<T>)

When the antecedent IDialog<TResult> has completed, stop the propagation of an exception of E.

DefaultIfException<T>(IDialog<T>) DefaultIfException<T>(IDialog<T>) DefaultIfException<T>(IDialog<T>)

When the antecedent IDialog<TResult> has completed, stop the propagation of Exception.

Do<T>(IDialog<T>, Func<IBotContext,IAwaitable<T>,Task>) Do<T>(IDialog<T>, Func<IBotContext,IAwaitable<T>,Task>) Do<T>(IDialog<T>, Func<IBotContext,IAwaitable<T>,Task>)

Execute a side-effect after a IDialog<TResult> completes.

Fold<T>(IDialog<IEnumerable<IDialog<T>>>, Func<T,T,T>) Fold<T>(IDialog<IEnumerable<IDialog<T>>>, Func<T,T,T>) Fold<T>(IDialog<IEnumerable<IDialog<T>>>, Func<T,T,T>)

Fold items from an enumeration of dialogs.

From<T>(Func<IDialog<T>>) From<T>(Func<IDialog<T>>) From<T>(Func<IDialog<T>>)

Construct a IDialog<TResult> that will make a new copy of another IDialog<TResult> when started.

Loop<T>(IDialog<T>) Loop<T>(IDialog<T>) Loop<T>(IDialog<T>)

Loop the IDialog<TResult> forever.

PostEvent<T,E>(IDialog<T>, E) PostEvent<T,E>(IDialog<T>, E) PostEvent<T,E>(IDialog<T>, E)

When the antecedent IDialog<TResult> has completed, post the item to the event queue.

PostToChain() PostToChain() PostToChain()

Post the message from the user to Chain.

PostToUser<T>(IDialog<T>) PostToUser<T>(IDialog<T>) PostToUser<T>(IDialog<T>)

Post to the user the result of a IDialog<TResult>.

Return<T>(T) Return<T>(T) Return<T>(T)

Creates a IDialog<TResult> that returns a value.

Select<T,R>(IDialog<T>, Func<T,R>) Select<T,R>(IDialog<T>, Func<T,R>) Select<T,R>(IDialog<T>, Func<T,R>)

When the antecedent IDialog<TResult> has completed, project the result into a new IDialog<TResult>.

SelectMany<T,C,R>(IDialog<T>, Func<T,IDialog<C>>, Func<T,C,R>) SelectMany<T,C,R>(IDialog<T>, Func<T,IDialog<C>>, Func<T,C,R>) SelectMany<T,C,R>(IDialog<T>, Func<T,IDialog<C>>, Func<T,C,R>)

When the antecedent IDialog<TResult> has completed, execute the next IDialog<TResult>, and use the projection to combine the results.

Switch<T,R>(IDialog<T>, ICase<T,R>[]) Switch<T,R>(IDialog<T>, ICase<T,R>[]) Switch<T,R>(IDialog<T>, ICase<T,R>[])

When the antecedent IDialog<TResult> has completed, go through each ICase<T,R> and run the ContextualSelector<T,R>" of the first ICase<T,R> that the returned value by the antecedent dialog satisfies.

Then<T,R>(IDialog<T>, Func<IBotContext,IAwaitable<T>,Task<R>>) Then<T,R>(IDialog<T>, Func<IBotContext,IAwaitable<T>,Task<R>>) Then<T,R>(IDialog<T>, Func<IBotContext,IAwaitable<T>,Task<R>>)

Execute an action after the IDialog<TResult> completes.

Unwrap<T>(IDialog<IDialog<T>>) Unwrap<T>(IDialog<IDialog<T>>) Unwrap<T>(IDialog<IDialog<T>>)

When the antecedent IDialog<TResult> where T is IDialog<TResult> completes, unwrap the result into a new IDialog<TResult>.

Void<T,R>(IDialog<T>) Void<T,R>(IDialog<T>) Void<T,R>(IDialog<T>)

Call the voided IDialog<TResult>, ignore the result, then restart the original dialog wait.

Void<T>(IDialog<T>, IDialogStack) Void<T>(IDialog<T>, IDialogStack) Void<T>(IDialog<T>, IDialogStack)

Call the voided IDialog<TResult>, ignore the result, then restart the original dialog wait.

WaitToBot<T>(IDialog<T>) WaitToBot<T>(IDialog<T>) WaitToBot<T>(IDialog<T>)

Post to the chain the message to the bot after the antecedent completes.

Where<T>(IDialog<T>, Func<T,Boolean>) Where<T>(IDialog<T>, Func<T,Boolean>) Where<T>(IDialog<T>, Func<T,Boolean>)

When the antecedent IDialog<TResult> has completed, evaluate the predicate and decide whether to continue.

While<T>(IDialog<T>, Func<T,IDialog<Boolean>>, Func<T,IDialog<T>>) While<T>(IDialog<T>, Func<T,IDialog<Boolean>>, Func<T,IDialog<T>>) While<T>(IDialog<T>, Func<T,IDialog<Boolean>>, Func<T,IDialog<T>>)

Create a IDialog<TResult> that represents a while loop.

WithScorable<T,Item,Score>(IDialog<T>, IScorable<Item,Score>) WithScorable<T,Item,Score>(IDialog<T>, IScorable<Item,Score>) WithScorable<T,Item,Score>(IDialog<T>, IScorable<Item,Score>)

Decorate a dialog with a scorable, so that a scorable can participate on the dialog stack.

Applies to