FormBuilder<T> FormBuilder<T> FormBuilder<T> Class

Definition

Build a form by specifying messages, fields and confirmations via reflection or programatically.

public sealed class FormBuilder<T> : Microsoft.Bot.Builder.FormFlow.FormBuilderBase<T> where T : class
type FormBuilder<'T (requires 'T : null)> = class
    inherit FormBuilderBase<'T (requires 'T : null)>
Public NotInheritable Class FormBuilder(Of T)
Inherits FormBuilderBase(Of T)
Type Parameters
T

Form state class.

Inheritance

Remarks

Fields will be defined through reflection over the type T and attributes like DescribeAttribute, NumericAttribute, OptionalAttributePatternAttribute, PromptAttribute, TermsAttribute and TemplateAttribute.
For all of the attributes, reasonable defaults will be generated.

Constructors

FormBuilder(Boolean) FormBuilder(Boolean) FormBuilder(Boolean)

Create a new form builder for building a form using reflection.

public FormBuilder (bool ignoreAnnotations = false);
new Microsoft.Bot.Builder.FormFlow.FormBuilder<'T (requires 'T : null)> : bool -> Microsoft.Bot.Builder.FormFlow.FormBuilder<'T (requires 'T : null)>
Public Sub New (Optional ignoreAnnotations As Boolean = false)
Parameters
ignoreAnnotations
Boolean Boolean Boolean

True to ignore any attributes on the form class.

Methods

AddRemainingFields(IEnumerable) AddRemainingFields(IEnumerable) AddRemainingFields(IEnumerable)

public override Microsoft.Bot.Builder.FormFlow.IFormBuilder<T> AddRemainingFields (System.Collections.Generic.IEnumerable<string> exclude = null);
override this.AddRemainingFields : seq<string> -> Microsoft.Bot.Builder.FormFlow.IFormBuilder<'T (requires 'T : null)>
Public Overrides Function AddRemainingFields (Optional exclude As IEnumerable(Of String) = null) As IFormBuilder(Of T)
Parameters
exclude
IEnumerable<String>
Returns

Build(Assembly, String) Build(Assembly, String) Build(Assembly, String)

public override Microsoft.Bot.Builder.FormFlow.IForm<T> Build (System.Reflection.Assembly resourceAssembly = null, string resourceName = null);
override this.Build : System.Reflection.Assembly * string -> Microsoft.Bot.Builder.FormFlow.IForm<'T (requires 'T : null)>
Public Overrides Function Build (Optional resourceAssembly As Assembly = null, Optional resourceName As String = null) As IForm(Of T)
Parameters
resourceAssembly
Assembly Assembly Assembly
resourceName
String String String
Returns

Confirm(MessageDelegate, ActiveDelegate, IEnumerable) Confirm(MessageDelegate, ActiveDelegate, IEnumerable) Confirm(MessageDelegate, ActiveDelegate, IEnumerable)

Inherited from FormBuilderBase<T>

Confirm(PromptAttribute, ActiveDelegate, IEnumerable) Confirm(PromptAttribute, ActiveDelegate, IEnumerable) Confirm(PromptAttribute, ActiveDelegate, IEnumerable)

Inherited from FormBuilderBase<T>

Confirm(String, ActiveDelegate, IEnumerable) Confirm(String, ActiveDelegate, IEnumerable) Confirm(String, ActiveDelegate, IEnumerable)

Inherited from FormBuilderBase<T>

Field(IField) Field(IField) Field(IField)

Inherited from FormBuilderBase<T>

Field(String, ActiveDelegate, ValidateAsyncDelegate) Field(String, ActiveDelegate, ValidateAsyncDelegate) Field(String, ActiveDelegate, ValidateAsyncDelegate)

public override Microsoft.Bot.Builder.FormFlow.IFormBuilder<T> Field (string name, Microsoft.Bot.Builder.FormFlow.ActiveDelegate<T> active = null, Microsoft.Bot.Builder.FormFlow.ValidateAsyncDelegate<T> validate = null);
override this.Field : string * Microsoft.Bot.Builder.FormFlow.ActiveDelegate<'T (requires 'T : null)> * Microsoft.Bot.Builder.FormFlow.ValidateAsyncDelegate<'T (requires 'T : null)> -> Microsoft.Bot.Builder.FormFlow.IFormBuilder<'T (requires 'T : null)>
Public Overrides Function Field (name As String, Optional active As ActiveDelegate(Of T) = null, Optional validate As ValidateAsyncDelegate(Of T) = null) As IFormBuilder(Of T)
Parameters
Returns

Field(String, PromptAttribute, ActiveDelegate, ValidateAsyncDelegate) Field(String, PromptAttribute, ActiveDelegate, ValidateAsyncDelegate) Field(String, PromptAttribute, ActiveDelegate, ValidateAsyncDelegate)

public override Microsoft.Bot.Builder.FormFlow.IFormBuilder<T> Field (string name, Microsoft.Bot.Builder.FormFlow.PromptAttribute prompt, Microsoft.Bot.Builder.FormFlow.ActiveDelegate<T> active = null, Microsoft.Bot.Builder.FormFlow.ValidateAsyncDelegate<T> validate = null);
override this.Field : string * Microsoft.Bot.Builder.FormFlow.PromptAttribute * Microsoft.Bot.Builder.FormFlow.ActiveDelegate<'T (requires 'T : null)> * Microsoft.Bot.Builder.FormFlow.ValidateAsyncDelegate<'T (requires 'T : null)> -> Microsoft.Bot.Builder.FormFlow.IFormBuilder<'T (requires 'T : null)>
Public Overrides Function Field (name As String, prompt As PromptAttribute, Optional active As ActiveDelegate(Of T) = null, Optional validate As ValidateAsyncDelegate(Of T) = null) As IFormBuilder(Of T)
Parameters
Returns

Field(String, String, ActiveDelegate, ValidateAsyncDelegate) Field(String, String, ActiveDelegate, ValidateAsyncDelegate) Field(String, String, ActiveDelegate, ValidateAsyncDelegate)

public override Microsoft.Bot.Builder.FormFlow.IFormBuilder<T> Field (string name, string prompt, Microsoft.Bot.Builder.FormFlow.ActiveDelegate<T> active = null, Microsoft.Bot.Builder.FormFlow.ValidateAsyncDelegate<T> validate = null);
override this.Field : string * string * Microsoft.Bot.Builder.FormFlow.ActiveDelegate<'T (requires 'T : null)> * Microsoft.Bot.Builder.FormFlow.ValidateAsyncDelegate<'T (requires 'T : null)> -> Microsoft.Bot.Builder.FormFlow.IFormBuilder<'T (requires 'T : null)>
Public Overrides Function Field (name As String, prompt As String, Optional active As ActiveDelegate(Of T) = null, Optional validate As ValidateAsyncDelegate(Of T) = null) As IFormBuilder(Of T)
Parameters
Returns

HasField(String) HasField(String) HasField(String)

Inherited from FormBuilderBase<T>

Message(MessageDelegate, ActiveDelegate, IEnumerable) Message(MessageDelegate, ActiveDelegate, IEnumerable) Message(MessageDelegate, ActiveDelegate, IEnumerable)

Inherited from FormBuilderBase<T>

Message(PromptAttribute, ActiveDelegate, IEnumerable) Message(PromptAttribute, ActiveDelegate, IEnumerable) Message(PromptAttribute, ActiveDelegate, IEnumerable)

Inherited from FormBuilderBase<T>

Message(String, ActiveDelegate, IEnumerable) Message(String, ActiveDelegate, IEnumerable) Message(String, ActiveDelegate, IEnumerable)

Inherited from FormBuilderBase<T>

OnCompletion(OnCompletionAsyncDelegate) OnCompletion(OnCompletionAsyncDelegate) OnCompletion(OnCompletionAsyncDelegate)

Inherited from FormBuilderBase<T>

Prompter(PromptAsyncDelegate) Prompter(PromptAsyncDelegate) Prompter(PromptAsyncDelegate)

Inherited from FormBuilderBase<T>

Fields

_form _form _form

Inherited from FormBuilderBase<T>

Properties

Configuration Configuration Configuration

Inherited from FormBuilderBase<T>

Applies to