Prompt<T>.AppendChoices(IMessageActivity, String, IList<Choice>, ListStyle, ChoiceFactoryOptions, CancellationToken) Method

Definition

When overridden in a derived class, appends choices to the activity when the user is prompted for input.

protected virtual Microsoft.Bot.Schema.IMessageActivity AppendChoices (Microsoft.Bot.Schema.IMessageActivity prompt, string channelId, System.Collections.Generic.IList<Microsoft.Bot.Builder.Dialogs.Choices.Choice> choices, Microsoft.Bot.Builder.Dialogs.Choices.ListStyle style, Microsoft.Bot.Builder.Dialogs.Choices.ChoiceFactoryOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member AppendChoices : Microsoft.Bot.Schema.IMessageActivity * string * System.Collections.Generic.IList<Microsoft.Bot.Builder.Dialogs.Choices.Choice> * Microsoft.Bot.Builder.Dialogs.Choices.ListStyle * Microsoft.Bot.Builder.Dialogs.Choices.ChoiceFactoryOptions * System.Threading.CancellationToken -> Microsoft.Bot.Schema.IMessageActivity
override this.AppendChoices : Microsoft.Bot.Schema.IMessageActivity * string * System.Collections.Generic.IList<Microsoft.Bot.Builder.Dialogs.Choices.Choice> * Microsoft.Bot.Builder.Dialogs.Choices.ListStyle * Microsoft.Bot.Builder.Dialogs.Choices.ChoiceFactoryOptions * System.Threading.CancellationToken -> Microsoft.Bot.Schema.IMessageActivity
Protected Overridable Function AppendChoices (prompt As IMessageActivity, channelId As String, choices As IList(Of Choice), style As ListStyle, Optional options As ChoiceFactoryOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As IMessageActivity

Parameters

prompt
IMessageActivity

The activity to append the choices to.

channelId
String

The ID of the user's channel.

choices
IList<Choice>

The choices to append.

style
ListStyle

Indicates how the choices should be presented to the user.

options
ChoiceFactoryOptions

The formatting options to use when presenting the choices.

cancellationToken
CancellationToken

A cancellation token that can be used by other objects or threads to receive notice of cancellation.

Returns

IMessageActivity

A Task representing the asynchronous operation.

Remarks

If the task is successful, the result contains the updated activity.

Applies to