PromptStyler.Apply 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
Apply(IMessageActivity, String, String)
- Source:
- PromptDialog.cs
设置提示的样式并填充 Text。
public virtual void Apply (ref Microsoft.Bot.Connector.IMessageActivity message, string prompt, string speak = default);
abstract member Apply : IMessageActivity * string * string -> unit
override this.Apply : IMessageActivity * string * string -> unit
Public Overridable Sub Apply (ByRef message As IMessageActivity, prompt As String, Optional speak As String = Nothing)
参数
- message
- IMessageActivity
将包含提示的消息。
- prompt
- String
提示。
- speak
- String
演讲。
适用于
Apply<T>(IMessageActivity, String, IReadOnlyList<T>, IReadOnlyList<String>, String)
- Source:
- PromptDialog.cs
设置提示的样式并基于 PromptStyle填充消息。
public virtual void Apply<T> (ref Microsoft.Bot.Connector.IMessageActivity message, string prompt, System.Collections.Generic.IReadOnlyList<T> options, System.Collections.Generic.IReadOnlyList<string> descriptions = default, string speak = default);
abstract member Apply : IMessageActivity * string * System.Collections.Generic.IReadOnlyList<'T> * System.Collections.Generic.IReadOnlyList<string> * string -> unit
override this.Apply : IMessageActivity * string * System.Collections.Generic.IReadOnlyList<'T> * System.Collections.Generic.IReadOnlyList<string> * string -> unit
Public Overridable Sub Apply(Of T) (ByRef message As IMessageActivity, prompt As String, options As IReadOnlyList(Of T), Optional descriptions As IReadOnlyList(Of String) = Nothing, Optional speak As String = Nothing)
类型参数
- T
选项的类型。
参数
- message
- IMessageActivity
将包含提示的消息。
- prompt
- String
提示。
- options
- IReadOnlyList<T>
选项。
- descriptions
- IReadOnlyList<String>
要为每个选项显示的说明。
- speak
- String
演讲。
注解
T
应实现 ToString() ,除非提供说明。
适用于
Apply<T>(IMessageActivity, String, IReadOnlyList<T>, PromptStyle, IReadOnlyList<String>, String)
- Source:
- PromptDialog.cs
public static void Apply<T> (ref Microsoft.Bot.Connector.IMessageActivity message, string prompt, System.Collections.Generic.IReadOnlyList<T> options, Microsoft.Bot.Builder.Dialogs.PromptStyle promptStyle, System.Collections.Generic.IReadOnlyList<string> descriptions = default, string speak = default);
static member Apply : IMessageActivity * string * System.Collections.Generic.IReadOnlyList<'T> * Microsoft.Bot.Builder.Dialogs.PromptStyle * System.Collections.Generic.IReadOnlyList<string> * string -> unit
Public Shared Sub Apply(Of T) (ByRef message As IMessageActivity, prompt As String, options As IReadOnlyList(Of T), promptStyle As PromptStyle, Optional descriptions As IReadOnlyList(Of String) = Nothing, Optional speak As String = Nothing)
类型参数
- T
选项的类型。
参数
- message
- IMessageActivity
消息。
- prompt
- String
提示。
- options
- IReadOnlyList<T>
选项。
- promptStyle
- PromptStyle
提示样式。
- descriptions
- IReadOnlyList<String>
每个选项的说明。
- speak
- String
演讲。