Prompt<T>.AppendChoices Method

Definition

Overloads

Name Description
AppendChoices(IActivity, String, IList<Choice>, ListStyle, ChoiceFactoryOptions, CancellationToken)

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

AppendChoices(IActivity, ChannelId, IList<Choice>, ListStyle, ChoiceFactoryOptions, String, IList<String>, CancellationToken)

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

AppendChoices(IActivity, String, IList<Choice>, ListStyle, ChoiceFactoryOptions, CancellationToken)

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

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

Parameters

prompt
IActivity

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

A Task representing the asynchronous operation.

Remarks

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

Applies to

AppendChoices(IActivity, ChannelId, IList<Choice>, ListStyle, ChoiceFactoryOptions, String, IList<String>, CancellationToken)

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

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

Parameters

prompt
IActivity

The activity to append the choices to.

channelId
ChannelId

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.

conversationType
String

The type of the conversation.

toList
IList<String>

The list of recipients.

cancellationToken
CancellationToken

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

Returns

A Task representing the asynchronous operation.

Remarks

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

Applies to