Language

FormBuilderJson クラス

定義

メッセージ、フィールド、確認をJSON Schemaやプログラムで指定してフォームを作成しましょう。

public sealed class FormBuilderJson : Microsoft.Bot.Builder.FormFlow.FormBuilderBase<Newtonsoft.Json.Linq.JObject>
type FormBuilderJson = class
    inherit FormBuilderBase<JObject>
Public NotInheritable Class FormBuilderJson
Inherits FormBuilderBase(Of JObject)
継承
FormBuilderBase<Newtonsoft.Json.Linq.JObject>
FormBuilderJson

注釈

C#の属性に対応するオプションの追加注釈を付けたJSON Schema でフォームを定義します。

%FormFlow 標準的な JSONスキーマ キーワードには以下が含まれます:

  • type -- はフィールド型を定義します。 * enum -- 可能な場の値を定義します。 * minimum -- NumericAttributeで説明された最小許容値を定義します。 * maximum -- NumericAttributeで説明される最大許容値を定義します。 * required -- 必要なフィールドを定義します。 * pattern -- 文字列フィールドは、 PatternAttributeで説明されたように入力パターンの検証に使用されます。

    テンプレートやプロンプトは TemplateAttribute や PromptAttributeと同じ語彙を使っています。 プロパティ名は同じで、値は基盤となるC#列挙と同じです。 例えば、 NotUnderstood テンプレートを上書きし、TemplateBaseAttribute.ChoiceStyleを指定するテンプレートを定義するには、スキーマに次のように入力します: ~~~ "Templates":{ "NotUnderunderstanded": { Patterns: ["I don't get it"], "ChoiceStyle": Auto"}} ~~~

    %Extensions スキーマのルート* OnCompletion: script -- フォームを完成させるための引数付きIDialogContext コンテキスト、JObject stateを持つC#スクリプトを定義しています。 * References: [assemblyReference, ...] -- スクリプトに含まれる参照を定義する。 パスは絶対的、または現在のディレクトリに対して相対的であるべきです。 デフォルトでは Microsoft.Bot.Builder.dll が含まれています。 * Imports: [import, ...] -- 使用情報付きのスクリプトにインポートを含める定義。 デフォルトではこれらのネームスペースは含まれます:Microsoft。Bot.Builder、Microsoft。Bot.Builder.Dialogs、Microsoft。Bot.Builder.FormFlow, Microsoft.Bot.Builder.FormFlow.Advanced、System.Collections.Generic、System.Linq

    %Extensions スキーマのルートや「型」プロパティのピアとして定義されます。 * Templates:{TemplateUsage: { Patterns:[string, ...], &lt;args&gt; }, ...} ――テンプレートを定義してください。 * Prompt: { Patterns:[string, ...] &lt;args&gt;} -- プロンプトを定義してください。

    %Extensions プロパティ記述内でJSONスキーマの「型」プロパティのピアとして見られます。 * DateTime:bool -- フィールドをDateTimeフィールドとしてマークします。 * Describe:string -- 『 DescribeAttribute』で記述されたフィールドの記述。 * Terms:[string,...] -- TermsAttributeで説明したフィールド値のマッチングのための正則表現。 * MaxPhrase:int ――これが条件を GenerateTerms(String, Int32) に通して拡張します。 * Values:{ string: {Describe:string, Terms:[string, ...], MaxPhrase}, ...} -- 文字列は「enum」という型で見つける必要があり、これにより自動生成された説明や用語を上書きできます。 MaxPhraseが指定されている場合、用語は GenerateTerms(String, Int32)を通ります。 * Active:script -- 引数付きC#スクリプト(JObject状態)->boolでfield/message/confirmがアクティブかどうかをテストします。 * Validate:script -- 引数付きC#スクリプト(JObjectの状態、オブジェクト値)->ValidateResultでフィールド値の検証。 * Define:script -- 引数付きC#スクリプト(JObject状態、Field<JObject> フィールド)を動的に定義するためのものです。 * Before:[confirm|message, ...] -- 包含フィールドの前のメッセージまたは確認。 * After:[confirm|message, ...] -- 包含フィールドの後にメッセージまたは確認があります。 * {Confirm:script|[string, ...], ...templateArgs} -- Before/Afterでは、C#スクリプト(引数付き)またはオプションのテンプレート引数でランダムに選ばれるパターン群を通じて確認を定義します。 * {Message:script|[string, ...] ...templateArgs} -- Before/Afterでは、C#スクリプト(引数付き)またはオプションのテンプレート引数でランダムに選ばれるパターン群でメッセージを定義します。 * Dependencies:[文字列、...]-- Fields that this field, message or confirm depends on.</p><p>Scripts can be any C# code you would find in a method body. You can add references through "References" and using through "Imports". Special global variables include: *choice-- internal dispatch for script to execute. *state-- JObject form state bound for all scripts. *ifield -- <xref data-throw-if-not-resolved="true" uid="Microsoft.Bot.Builder.FormFlow.Advanced.IField1"> /Confirmプロンプトビルダーを除くすべてのスクリプトで現在のフィールドを推論できるように %Message。 * value -- Validateのために検証されるオブジェクト値。 * field -- Field<T> Defineでフィールドを動的に更新できるようにするためです。 * context -- IDialogContext OnCompletionで結果を投稿できるようにコンテキストを用意してください。

    このクラスで定義された %Fields、他の分野と同様にプログラム的に定義を拡張またはオーバーライドする能力を持っています。 また、同じ方法で局所化することも可能です。

コンストラクター

名前 説明
FormBuilderJson(JObject)

JSONフォームビルダーを作成しましょう。

フィールド

名前 説明
_form

メッセージ、フィールド、確認をJSON Schemaやプログラムで指定してフォームを作成しましょう。

(継承元 FormBuilderBase<T>)

プロパティ

名前 説明
Configuration

メッセージ、フィールド、確認をJSON Schemaやプログラムで指定してフォームを作成しましょう。

(継承元 FormBuilderBase<T>)
Schema

メッセージ、フィールド、確認をJSON Schemaやプログラムで指定してフォームを作成しましょう。

メソッド

名前 説明
AddRemainingFields(IEnumerable<String>)

メッセージ、フィールド、確認をJSON Schemaやプログラムで指定してフォームを作成しましょう。

Build(Assembly, String)

メッセージ、フィールド、確認をJSON Schemaやプログラムで指定してフォームを作成しましょう。

Confirm(MessageDelegate<T>, ActiveDelegate<T>, IEnumerable<String>)

メッセージ、フィールド、確認をJSON Schemaやプログラムで指定してフォームを作成しましょう。

(継承元 FormBuilderBase<T>)
Confirm(PromptAttribute, ActiveDelegate<T>, IEnumerable<String>)

メッセージ、フィールド、確認をJSON Schemaやプログラムで指定してフォームを作成しましょう。

(継承元 FormBuilderBase<T>)
Confirm(String, ActiveDelegate<T>, IEnumerable<String>)

メッセージ、フィールド、確認をJSON Schemaやプログラムで指定してフォームを作成しましょう。

(継承元 FormBuilderBase<T>)
Field(IField<T>)

メッセージ、フィールド、確認をJSON Schemaやプログラムで指定してフォームを作成しましょう。

(継承元 FormBuilderBase<T>)
Field(String, ActiveDelegate<JObject>, ValidateAsyncDelegate<JObject>)

メッセージ、フィールド、確認をJSON Schemaやプログラムで指定してフォームを作成しましょう。

Field(String, ActiveDelegate<T>, ValidateAsyncDelegate<T>)

メッセージ、フィールド、確認をJSON Schemaやプログラムで指定してフォームを作成しましょう。

(継承元 FormBuilderBase<T>)
Field(String, PromptAttribute, ActiveDelegate<JObject>, ValidateAsyncDelegate<JObject>)

メッセージ、フィールド、確認をJSON Schemaやプログラムで指定してフォームを作成しましょう。

Field(String, PromptAttribute, ActiveDelegate<T>, ValidateAsyncDelegate<T>)

メッセージ、フィールド、確認をJSON Schemaやプログラムで指定してフォームを作成しましょう。

(継承元 FormBuilderBase<T>)
Field(String, String, ActiveDelegate<JObject>, ValidateAsyncDelegate<JObject>)

メッセージ、フィールド、確認をJSON Schemaやプログラムで指定してフォームを作成しましょう。

Field(String, String, ActiveDelegate<T>, ValidateAsyncDelegate<T>)

メッセージ、フィールド、確認をJSON Schemaやプログラムで指定してフォームを作成しましょう。

(継承元 FormBuilderBase<T>)
HasField(String)

メッセージ、フィールド、確認をJSON Schemaやプログラムで指定してフォームを作成しましょう。

(継承元 FormBuilderBase<T>)
Message(MessageDelegate<T>, ActiveDelegate<T>, IEnumerable<String>)

メッセージ、フィールド、確認をJSON Schemaやプログラムで指定してフォームを作成しましょう。

(継承元 FormBuilderBase<T>)
Message(PromptAttribute, ActiveDelegate<T>, IEnumerable<String>)

メッセージ、フィールド、確認をJSON Schemaやプログラムで指定してフォームを作成しましょう。

(継承元 FormBuilderBase<T>)
Message(String, ActiveDelegate<T>, IEnumerable<String>)

メッセージ、フィールド、確認をJSON Schemaやプログラムで指定してフォームを作成しましょう。

(継承元 FormBuilderBase<T>)
OnCompletion(OnCompletionAsyncDelegate<T>)

メッセージ、フィールド、確認をJSON Schemaやプログラムで指定してフォームを作成しましょう。

(継承元 FormBuilderBase<T>)
Prompter(PromptAsyncDelegate<T>)

メッセージ、フィールド、確認をJSON Schemaやプログラムで指定してフォームを作成しましょう。

(継承元 FormBuilderBase<T>)

適用対象