Field<T> Field<T> Field<T> Class

Definition

Base class with declarative implementation of IField.

public class Field<T> : Microsoft.Bot.Builder.FormFlow.Advanced.IField<T>, Microsoft.Bot.Builder.FormFlow.Advanced.IFieldPrompt<T>, Microsoft.Bot.Builder.FormFlow.Advanced.IFieldState<T> where T : class
type Field<'T (requires 'T : null)> = class
    interface IField<'T (requires 'T : null)>
    interface IFieldState<'T (requires 'T : null)>
    interface IFieldDescription
    interface IFieldPrompt<'T (requires 'T : null)>
    interface IFieldResources
Public Class Field(Of T)
Implements IField(Of T), IFieldPrompt(Of T), IFieldState(Of T)
Type Parameters
T

Underlying form state.

Inheritance
Field<T>Field<T>Field<T>
Derived
Implements

Constructors

Field(String, FieldRole) Field(String, FieldRole) Field(String, FieldRole)

Construct field.

public Field (string name, Microsoft.Bot.Builder.FormFlow.Advanced.FieldRole role);
new Microsoft.Bot.Builder.FormFlow.Advanced.Field<'T (requires 'T : null)> : string * Microsoft.Bot.Builder.FormFlow.Advanced.FieldRole -> Microsoft.Bot.Builder.FormFlow.Advanced.Field<'T (requires 'T : null)>
Public Sub New (name As String, role As FieldRole)
Parameters
name
String String String

Name of field.

role
FieldRole FieldRole FieldRole

Role field plays in form.

Fields

_allowsMultiple _allowsMultiple _allowsMultiple

protected bool _allowsMultiple;
val mutable _allowsMultiple : bool
Protected _allowsMultiple As Boolean 

_buildPrompts _buildPrompts _buildPrompts

protected bool _buildPrompts;
val mutable _buildPrompts : bool
Protected _buildPrompts As Boolean 

_condition _condition _condition

protected Microsoft.Bot.Builder.FormFlow.ActiveDelegate<T> _condition;
val mutable _condition : Microsoft.Bot.Builder.FormFlow.ActiveDelegate<'T (requires 'T : null)>
Protected _condition As ActiveDelegate(Of T) 

_define _define _define

protected Microsoft.Bot.Builder.FormFlow.Advanced.DefineAsyncDelegate<T> _define;
val mutable _define : Microsoft.Bot.Builder.FormFlow.Advanced.DefineAsyncDelegate<'T (requires 'T : null)>
Protected _define As DefineAsyncDelegate(Of T) 

_dependencies _dependencies _dependencies

protected string[] _dependencies;
val mutable _dependencies : string[]
Protected _dependencies As String() 

_description _description _description

protected Microsoft.Bot.Builder.FormFlow.DescribeAttribute _description;
val mutable _description : Microsoft.Bot.Builder.FormFlow.DescribeAttribute
Protected _description As DescribeAttribute 

_form _form _form

protected Microsoft.Bot.Builder.FormFlow.IForm<T> _form;
val mutable _form : Microsoft.Bot.Builder.FormFlow.IForm<'T (requires 'T : null)>
Protected _form As IForm(Of T) 

_help _help _help

protected Microsoft.Bot.Builder.FormFlow.Advanced.IPrompt<T> _help;
val mutable _help : Microsoft.Bot.Builder.FormFlow.Advanced.IPrompt<'T (requires 'T : null)>
Protected _help As IPrompt(Of T) 

_isNullable _isNullable _isNullable

protected bool _isNullable;
val mutable _isNullable : bool
Protected _isNullable As Boolean 

_keepZero _keepZero _keepZero

protected bool _keepZero;
val mutable _keepZero : bool
Protected _keepZero As Boolean 

_limited _limited _limited

protected bool _limited;
val mutable _limited : bool
Protected _limited As Boolean 

_max _max _max

protected double _max;
val mutable _max : double
Protected _max As Double 

_min _min _min

protected double _min;
val mutable _min : double
Protected _min As Double 

_name _name _name

protected string _name;
val mutable _name : string
Protected _name As String 

_next _next _next

protected Microsoft.Bot.Builder.FormFlow.Advanced.NextDelegate<T> _next;
val mutable _next : Microsoft.Bot.Builder.FormFlow.Advanced.NextDelegate<'T (requires 'T : null)>
Protected _next As NextDelegate(Of T) 

_optional _optional _optional

protected bool _optional;
val mutable _optional : bool
Protected _optional As Boolean 

_pattern _pattern _pattern

protected string _pattern;
val mutable _pattern : string
Protected _pattern As String 

_prompt _prompt _prompt

protected Microsoft.Bot.Builder.FormFlow.Advanced.IPrompt<T> _prompt;
val mutable _prompt : Microsoft.Bot.Builder.FormFlow.Advanced.IPrompt<'T (requires 'T : null)>
Protected _prompt As IPrompt(Of T) 

_promptDefinition _promptDefinition _promptDefinition

protected Microsoft.Bot.Builder.FormFlow.PromptAttribute _promptDefinition;
val mutable _promptDefinition : Microsoft.Bot.Builder.FormFlow.PromptAttribute
Protected _promptDefinition As PromptAttribute 

_promptSet _promptSet _promptSet

protected bool _promptSet;
val mutable _promptSet : bool
Protected _promptSet As Boolean 

_recognizer _recognizer _recognizer

protected Microsoft.Bot.Builder.FormFlow.Advanced.IRecognize<T> _recognizer;
val mutable _recognizer : Microsoft.Bot.Builder.FormFlow.Advanced.IRecognize<'T (requires 'T : null)>
Protected _recognizer As IRecognize(Of T) 

_role _role _role

protected Microsoft.Bot.Builder.FormFlow.Advanced.FieldRole _role;
val mutable _role : Microsoft.Bot.Builder.FormFlow.Advanced.FieldRole
Protected _role As FieldRole 

_templates _templates _templates

protected System.Collections.Generic.Dictionary<Microsoft.Bot.Builder.FormFlow.TemplateUsage,Microsoft.Bot.Builder.FormFlow.TemplateAttribute> _templates;
val mutable _templates : System.Collections.Generic.Dictionary<Microsoft.Bot.Builder.FormFlow.TemplateUsage, Microsoft.Bot.Builder.FormFlow.TemplateAttribute>
Protected _templates As Dictionary(Of TemplateUsage, TemplateAttribute) 

_terms _terms _terms

protected Microsoft.Bot.Builder.FormFlow.TermsAttribute _terms;
val mutable _terms : Microsoft.Bot.Builder.FormFlow.TermsAttribute
Protected _terms As TermsAttribute 

_type _type _type

protected Type _type;
val mutable _type : Type
Protected _type As Type 

_validate _validate _validate

protected Microsoft.Bot.Builder.FormFlow.ValidateAsyncDelegate<T> _validate;
val mutable _validate : Microsoft.Bot.Builder.FormFlow.ValidateAsyncDelegate<'T (requires 'T : null)>
Protected _validate As ValidateAsyncDelegate(Of T) 

_valueDescriptions _valueDescriptions _valueDescriptions

protected System.Collections.Generic.Dictionary<object,Microsoft.Bot.Builder.FormFlow.DescribeAttribute> _valueDescriptions;
val mutable _valueDescriptions : System.Collections.Generic.Dictionary<obj, Microsoft.Bot.Builder.FormFlow.DescribeAttribute>
Protected _valueDescriptions As Dictionary(Of Object, DescribeAttribute) 

_valueTerms _valueTerms _valueTerms

protected System.Collections.Generic.Dictionary<object,Microsoft.Bot.Builder.FormFlow.TermsAttribute> _valueTerms;
val mutable _valueTerms : System.Collections.Generic.Dictionary<obj, Microsoft.Bot.Builder.FormFlow.TermsAttribute>
Protected _valueTerms As Dictionary(Of Object, TermsAttribute) 

Properties

AllowDefault AllowDefault AllowDefault

public virtual bool AllowDefault { get; }
member this.AllowDefault : bool
Public Overridable ReadOnly Property AllowDefault As Boolean

AllowNumbers AllowNumbers AllowNumbers

public bool AllowNumbers { get; }
member this.AllowNumbers : bool
Public ReadOnly Property AllowNumbers As Boolean

AllowsMultiple AllowsMultiple AllowsMultiple

public virtual bool AllowsMultiple { get; }
member this.AllowsMultiple : bool
Public Overridable ReadOnly Property AllowsMultiple As Boolean

Dependencies Dependencies Dependencies

public virtual System.Collections.Generic.IEnumerable<string> Dependencies { get; }
member this.Dependencies : seq<string>
Public Overridable ReadOnly Property Dependencies As IEnumerable(Of String)

FieldDescription FieldDescription FieldDescription

public virtual Microsoft.Bot.Builder.FormFlow.DescribeAttribute FieldDescription { get; }
member this.FieldDescription : Microsoft.Bot.Builder.FormFlow.DescribeAttribute
Public Overridable ReadOnly Property FieldDescription As DescribeAttribute

FieldTerms FieldTerms FieldTerms

public virtual System.Collections.Generic.IEnumerable<string> FieldTerms { get; }
member this.FieldTerms : seq<string>
Public Overridable ReadOnly Property FieldTerms As IEnumerable(Of String)

Form Form Form

public virtual Microsoft.Bot.Builder.FormFlow.IForm<T> Form { get; set; }
member this.Form : Microsoft.Bot.Builder.FormFlow.IForm<'T (requires 'T : null)> with get, set
Public Overridable Property Form As IForm(Of T)

Help Help Help

public virtual Microsoft.Bot.Builder.FormFlow.Advanced.IPrompt<T> Help { get; }
member this.Help : Microsoft.Bot.Builder.FormFlow.Advanced.IPrompt<'T (requires 'T : null)>
Public Overridable ReadOnly Property Help As IPrompt(Of T)

IsNullable IsNullable IsNullable

public virtual bool IsNullable { get; }
member this.IsNullable : bool
Public Overridable ReadOnly Property IsNullable As Boolean

Name Name Name

public string Name { get; }
member this.Name : string
Public ReadOnly Property Name As String

Optional Optional Optional

public virtual bool Optional { get; }
member this.Optional : bool
Public Overridable ReadOnly Property Optional As Boolean

Pattern Pattern Pattern

public virtual string Pattern { get; }
member this.Pattern : string
Public Overridable ReadOnly Property Pattern As String

Prompt Prompt Prompt

public virtual Microsoft.Bot.Builder.FormFlow.Advanced.IPrompt<T> Prompt { get; }
member this.Prompt : Microsoft.Bot.Builder.FormFlow.Advanced.IPrompt<'T (requires 'T : null)>
Public Overridable ReadOnly Property Prompt As IPrompt(Of T)

Role Role Role

public virtual Microsoft.Bot.Builder.FormFlow.Advanced.FieldRole Role { get; }
member this.Role : Microsoft.Bot.Builder.FormFlow.Advanced.FieldRole
Public Overridable ReadOnly Property Role As FieldRole

Type Type Type

public virtual Type Type { get; }
member this.Type : Type
Public Overridable ReadOnly Property Type As Type
Value
Type Type Type

ValueDescriptions ValueDescriptions ValueDescriptions

public virtual System.Collections.Generic.IEnumerable<Microsoft.Bot.Builder.FormFlow.DescribeAttribute> ValueDescriptions { get; }
member this.ValueDescriptions : seq<Microsoft.Bot.Builder.FormFlow.DescribeAttribute>
Public Overridable ReadOnly Property ValueDescriptions As IEnumerable(Of DescribeAttribute)

Values Values Values

public virtual System.Collections.Generic.IEnumerable<object> Values { get; }
member this.Values : seq<obj>
Public Overridable ReadOnly Property Values As IEnumerable(Of Object)

Methods

Active(T) Active(T) Active(T)

public virtual bool Active (T state);
abstract member Active : 'T -> bool
override this.Active : 'T -> bool
Public Overridable Function Active (state As T) As Boolean
Parameters
state
Returns

AddDescription(Object, DescribeAttribute) AddDescription(Object, DescribeAttribute) AddDescription(Object, DescribeAttribute)

Adds a full description for a value.

public Microsoft.Bot.Builder.FormFlow.Advanced.Field<T> AddDescription (object value, Microsoft.Bot.Builder.FormFlow.DescribeAttribute description);
member this.AddDescription : obj * Microsoft.Bot.Builder.FormFlow.DescribeAttribute -> Microsoft.Bot.Builder.FormFlow.Advanced.Field<'T (requires 'T : null)>
Public Function AddDescription (value As Object, description As DescribeAttribute) As Field(Of T)
Parameters
value
Object Object Object

The value.

description
DescribeAttribute DescribeAttribute DescribeAttribute

Description of the value.

Returns

AddDescription(Object, String, String, String) AddDescription(Object, String, String, String) AddDescription(Object, String, String, String)

Adds a description for a value.

public Microsoft.Bot.Builder.FormFlow.Advanced.Field<T> AddDescription (object value, string description, string image = null, string message = null);
member this.AddDescription : obj * string * string * string -> Microsoft.Bot.Builder.FormFlow.Advanced.Field<'T (requires 'T : null)>
Public Function AddDescription (value As Object, description As String, Optional image As String = null, Optional message As String = null) As Field(Of T)
Parameters
value
Object Object Object

The value.

description
String String String

Description of the value.

image
String String String

Image to use for value as button.

message
String String String

Message to return when button is pressed.

Returns

AddTemplate(TemplateAttribute) AddTemplate(TemplateAttribute) AddTemplate(TemplateAttribute)

protected void AddTemplate (Microsoft.Bot.Builder.FormFlow.TemplateAttribute template);
member this.AddTemplate : Microsoft.Bot.Builder.FormFlow.TemplateAttribute -> unit
Protected Sub AddTemplate (template As TemplateAttribute)
Parameters

AddTerms(Object, TermsAttribute) AddTerms(Object, TermsAttribute) AddTerms(Object, TermsAttribute)

Adds terms for a value.

public Microsoft.Bot.Builder.FormFlow.Advanced.Field<T> AddTerms (object value, Microsoft.Bot.Builder.FormFlow.TermsAttribute terms);
member this.AddTerms : obj * Microsoft.Bot.Builder.FormFlow.TermsAttribute -> Microsoft.Bot.Builder.FormFlow.Advanced.Field<'T (requires 'T : null)>
Public Function AddTerms (value As Object, terms As TermsAttribute) As Field(Of T)
Parameters
value
Object Object Object

The value.

terms
TermsAttribute TermsAttribute TermsAttribute

The terms to add.

Returns

AddTerms(Object, String[]) AddTerms(Object, String[]) AddTerms(Object, String[])

Adds terms for a value.

public Microsoft.Bot.Builder.FormFlow.Advanced.Field<T> AddTerms (object value, params string[] terms);
member this.AddTerms : obj * string[] -> Microsoft.Bot.Builder.FormFlow.Advanced.Field<'T (requires 'T : null)>
Public Function AddTerms (value As Object, ParamArray terms As String()) As Field(Of T)
Parameters
value
Object Object Object

The value.

terms
String[]

The terms.

Returns

DefineAsync(T) DefineAsync(T) DefineAsync(T)

[System.Runtime.CompilerServices.AsyncStateMachine(typeof(Microsoft.Bot.Builder.FormFlow.Advanced.Field`1/<DefineAsync>d__45))]
public virtual System.Threading.Tasks.Task<bool> DefineAsync (T state);
abstract member DefineAsync : 'T -> System.Threading.Tasks.Task<bool>
override this.DefineAsync : 'T -> System.Threading.Tasks.Task<bool>
Public Overridable Function DefineAsync (state As T) As Task(Of Boolean)
Parameters
state
Returns

DefinePrompt() DefinePrompt() DefinePrompt()

protected void DefinePrompt ();
member this.DefinePrompt : unit -> unit
Protected Sub DefinePrompt ()

DefineRecognizer() DefineRecognizer() DefineRecognizer()

protected void DefineRecognizer ();
member this.DefineRecognizer : unit -> unit
Protected Sub DefineRecognizer ()

GetValue(T) GetValue(T) GetValue(T)

public virtual object GetValue (T state);
abstract member GetValue : 'T -> obj
override this.GetValue : 'T -> obj
Public Overridable Function GetValue (state As T) As Object
Parameters
state
Returns

IsUnknown(T) IsUnknown(T) IsUnknown(T)

public virtual bool IsUnknown (T state);
abstract member IsUnknown : 'T -> bool
override this.IsUnknown : 'T -> bool
Public Overridable Function IsUnknown (state As T) As Boolean
Parameters
state
Returns

Limits(Double, Double) Limits(Double, Double) Limits(Double, Double)

public virtual bool Limits (out double min, out double max);
abstract member Limits :  *  -> bool
override this.Limits :  *  -> bool
Public Overridable Function Limits (ByRef min As Double, ByRef max As Double) As Boolean
Parameters
Returns

Localize() Localize() Localize()

public virtual void Localize ();
abstract member Localize : unit -> unit
override this.Localize : unit -> unit
Public Overridable Sub Localize ()

Next(Object, T) Next(Object, T) Next(Object, T)

public virtual Microsoft.Bot.Builder.FormFlow.Advanced.NextStep Next (object value, T state);
abstract member Next : obj * 'T -> Microsoft.Bot.Builder.FormFlow.Advanced.NextStep
override this.Next : obj * 'T -> Microsoft.Bot.Builder.FormFlow.Advanced.NextStep
Public Overridable Function Next (value As Object, state As T) As NextStep
Parameters
state
Returns

RemoveValue(Object) RemoveValue(Object) RemoveValue(Object)

Removes the description and terms associated with a value.

public Microsoft.Bot.Builder.FormFlow.Advanced.Field<T> RemoveValue (object value);
member this.RemoveValue : obj -> Microsoft.Bot.Builder.FormFlow.Advanced.Field<'T (requires 'T : null)>
Public Function RemoveValue (value As Object) As Field(Of T)
Parameters
value
Object Object Object

The value to remove.

Returns

RemoveValues() RemoveValues() RemoveValues()

Removes all values and their associated descriptions and terms.

public Microsoft.Bot.Builder.FormFlow.Advanced.Field<T> RemoveValues ();
member this.RemoveValues : unit -> Microsoft.Bot.Builder.FormFlow.Advanced.Field<'T (requires 'T : null)>
Public Function RemoveValues () As Field(Of T)
Returns

ReplaceTemplate(TemplateAttribute) ReplaceTemplate(TemplateAttribute) ReplaceTemplate(TemplateAttribute)

Replace a template in the field.

public Microsoft.Bot.Builder.FormFlow.Advanced.Field<T> ReplaceTemplate (Microsoft.Bot.Builder.FormFlow.TemplateAttribute template);
member this.ReplaceTemplate : Microsoft.Bot.Builder.FormFlow.TemplateAttribute -> Microsoft.Bot.Builder.FormFlow.Advanced.Field<'T (requires 'T : null)>
Public Function ReplaceTemplate (template As TemplateAttribute) As Field(Of T)
Parameters
Returns

SaveResources() SaveResources() SaveResources()

public virtual void SaveResources ();
abstract member SaveResources : unit -> unit
override this.SaveResources : unit -> unit
Public Overridable Sub SaveResources ()

SetActive(ActiveDelegate) SetActive(ActiveDelegate) SetActive(ActiveDelegate)

Define a delegate for checking state to see if field applies.

public Microsoft.Bot.Builder.FormFlow.Advanced.Field<T> SetActive (Microsoft.Bot.Builder.FormFlow.ActiveDelegate<T> condition);
member this.SetActive : Microsoft.Bot.Builder.FormFlow.ActiveDelegate<'T (requires 'T : null)> -> Microsoft.Bot.Builder.FormFlow.Advanced.Field<'T (requires 'T : null)>
Public Function SetActive (condition As ActiveDelegate(Of T)) As Field(Of T)
Parameters
condition
ActiveDelegate<T> ActiveDelegate<T> ActiveDelegate<T>

The condition delegate.

Returns

SetAllowsMultiple(Boolean) SetAllowsMultiple(Boolean) SetAllowsMultiple(Boolean)

Sets whether or not multiple values are allowed.

public Microsoft.Bot.Builder.FormFlow.Advanced.Field<T> SetAllowsMultiple (bool multiple = true);
member this.SetAllowsMultiple : bool -> Microsoft.Bot.Builder.FormFlow.Advanced.Field<'T (requires 'T : null)>
Public Function SetAllowsMultiple (Optional multiple As Boolean = true) As Field(Of T)
Parameters
multiple
Boolean Boolean Boolean

True if multiple values are allowed.

Returns

SetDefine(DefineAsyncDelegate) SetDefine(DefineAsyncDelegate) SetDefine(DefineAsyncDelegate)

Define a delegate for dynamically defining field.

public Microsoft.Bot.Builder.FormFlow.Advanced.Field<T> SetDefine (Microsoft.Bot.Builder.FormFlow.Advanced.DefineAsyncDelegate<T> definition);
member this.SetDefine : Microsoft.Bot.Builder.FormFlow.Advanced.DefineAsyncDelegate<'T (requires 'T : null)> -> Microsoft.Bot.Builder.FormFlow.Advanced.Field<'T (requires 'T : null)>
Public Function SetDefine (definition As DefineAsyncDelegate(Of T)) As Field(Of T)
Parameters
Returns

Remarks

When you dynamically define a field through this delegate you can use all of the fluent methods defined on Field<T> to change the descriptions and terms dynamically.

SetDependencies(String[]) SetDependencies(String[]) SetDependencies(String[])

Define the fields this field depends on.

public Microsoft.Bot.Builder.FormFlow.Advanced.Field<T> SetDependencies (params string[] dependencies);
member this.SetDependencies : string[] -> Microsoft.Bot.Builder.FormFlow.Advanced.Field<'T (requires 'T : null)>
Public Function SetDependencies (ParamArray dependencies As String()) As Field(Of T)
Parameters
dependencies
String[]

A variable-length parameters list containing dependencies.

Returns

SetFieldDescription(String) SetFieldDescription(String) SetFieldDescription(String)

Set the field description.

public Microsoft.Bot.Builder.FormFlow.Advanced.Field<T> SetFieldDescription (string description);
member this.SetFieldDescription : string -> Microsoft.Bot.Builder.FormFlow.Advanced.Field<'T (requires 'T : null)>
Public Function SetFieldDescription (description As String) As Field(Of T)
Parameters
description
String String String

Field description.

Returns

SetFieldDescription(DescribeAttribute) SetFieldDescription(DescribeAttribute) SetFieldDescription(DescribeAttribute)

Set the full field description.

public Microsoft.Bot.Builder.FormFlow.Advanced.Field<T> SetFieldDescription (Microsoft.Bot.Builder.FormFlow.DescribeAttribute description);
member this.SetFieldDescription : Microsoft.Bot.Builder.FormFlow.DescribeAttribute -> Microsoft.Bot.Builder.FormFlow.Advanced.Field<'T (requires 'T : null)>
Public Function SetFieldDescription (description As DescribeAttribute) As Field(Of T)
Parameters
description
DescribeAttribute DescribeAttribute DescribeAttribute

The field description.

Returns

SetFieldTerms(String[]) SetFieldTerms(String[]) SetFieldTerms(String[])

Set the terms associated with the field.

public Microsoft.Bot.Builder.FormFlow.Advanced.Field<T> SetFieldTerms (params string[] terms);
member this.SetFieldTerms : string[] -> Microsoft.Bot.Builder.FormFlow.Advanced.Field<'T (requires 'T : null)>
Public Function SetFieldTerms (ParamArray terms As String()) As Field(Of T)
Parameters
terms
String[]

The terms.

Returns

SetIsNullable(Boolean) SetIsNullable(Boolean) SetIsNullable(Boolean)

Set whether or not field is nullable.

public Microsoft.Bot.Builder.FormFlow.Advanced.Field<T> SetIsNullable (bool nullable = true);
member this.SetIsNullable : bool -> Microsoft.Bot.Builder.FormFlow.Advanced.Field<'T (requires 'T : null)>
Public Function SetIsNullable (Optional nullable As Boolean = true) As Field(Of T)
Parameters
nullable
Boolean Boolean Boolean

True if field is nullable.

Returns

SetLimits(Double, Double) SetLimits(Double, Double) SetLimits(Double, Double)

Set numeric limits.

public Microsoft.Bot.Builder.FormFlow.Advanced.Field<T> SetLimits (double min, double max);
member this.SetLimits : double * double -> Microsoft.Bot.Builder.FormFlow.Advanced.Field<'T (requires 'T : null)>
Public Function SetLimits (min As Double, max As Double) As Field(Of T)
Parameters
min
Double Double Double

The minimum.

max
Double Double Double

The maximum.

Returns

SetLimits(Double, Double, Boolean) SetLimits(Double, Double, Boolean) SetLimits(Double, Double, Boolean)

protected void SetLimits (double min, double max, bool limited);
member this.SetLimits : double * double * bool -> unit
Protected Sub SetLimits (min As Double, max As Double, limited As Boolean)
Parameters

SetNext(NextDelegate) SetNext(NextDelegate) SetNext(NextDelegate)

Delegate for deciding on the next form step to execute.

public Microsoft.Bot.Builder.FormFlow.Advanced.Field<T> SetNext (Microsoft.Bot.Builder.FormFlow.Advanced.NextDelegate<T> next);
member this.SetNext : Microsoft.Bot.Builder.FormFlow.Advanced.NextDelegate<'T (requires 'T : null)> -> Microsoft.Bot.Builder.FormFlow.Advanced.Field<'T (requires 'T : null)>
Public Function SetNext (next As NextDelegate(Of T)) As Field(Of T)
Parameters
Returns

SetOptional(Boolean) SetOptional(Boolean) SetOptional(Boolean)

Set whether or not a field is optional.

public Microsoft.Bot.Builder.FormFlow.Advanced.Field<T> SetOptional (bool optional = true);
member this.SetOptional : bool -> Microsoft.Bot.Builder.FormFlow.Advanced.Field<'T (requires 'T : null)>
Public Function SetOptional (Optional optional As Boolean = true) As Field(Of T)
Parameters
optional
Boolean Boolean Boolean

True if field is optional.

Returns

SetPattern(String) SetPattern(String) SetPattern(String)

Regular expression for validating strings.

public Microsoft.Bot.Builder.FormFlow.Advanced.Field<T> SetPattern (string pattern);
member this.SetPattern : string -> Microsoft.Bot.Builder.FormFlow.Advanced.Field<'T (requires 'T : null)>
Public Function SetPattern (pattern As String) As Field(Of T)
Parameters
pattern
String String String

Validation regular expression.

Returns

SetPrompt(PromptAttribute) SetPrompt(PromptAttribute) SetPrompt(PromptAttribute)

Sets the field prompt.

public Microsoft.Bot.Builder.FormFlow.Advanced.Field<T> SetPrompt (Microsoft.Bot.Builder.FormFlow.PromptAttribute prompt);
member this.SetPrompt : Microsoft.Bot.Builder.FormFlow.PromptAttribute -> Microsoft.Bot.Builder.FormFlow.Advanced.Field<'T (requires 'T : null)>
Public Function SetPrompt (prompt As PromptAttribute) As Field(Of T)
Parameters
Returns

SetRecognizer(IRecognize) SetRecognizer(IRecognize) SetRecognizer(IRecognize)

Sets the recognizer for the field.

public Microsoft.Bot.Builder.FormFlow.Advanced.Field<T> SetRecognizer (Microsoft.Bot.Builder.FormFlow.Advanced.IRecognize<T> recognizer);
member this.SetRecognizer : Microsoft.Bot.Builder.FormFlow.Advanced.IRecognize<'T (requires 'T : null)> -> Microsoft.Bot.Builder.FormFlow.Advanced.Field<'T (requires 'T : null)>
Public Function SetRecognizer (recognizer As IRecognize(Of T)) As Field(Of T)
Parameters
recognizer
IRecognize<T> IRecognize<T> IRecognize<T>

The recognizer for the field.

Returns

Remarks

This should only be called when you are dynamically defining a field using a DefineAsyncDelegate<T> because recognizers usually require the field and often change if the localization changes.

SetType(Type) SetType(Type)

Sets the type of the underlying field state.

public Microsoft.Bot.Builder.FormFlow.Advanced.Field<T> SetType (Type type);
member this.SetType : Type -> Microsoft.Bot.Builder.FormFlow.Advanced.Field<'T (requires 'T : null)>
Parameters
type
Type Type Type

The field type.

Returns

SetUnknown(T) SetUnknown(T) SetUnknown(T)

public virtual void SetUnknown (T state);
abstract member SetUnknown : 'T -> unit
override this.SetUnknown : 'T -> unit
Public Overridable Sub SetUnknown (state As T)
Parameters
state

SetValidate(ValidateAsyncDelegate) SetValidate(ValidateAsyncDelegate) SetValidate(ValidateAsyncDelegate)

Set the field validation.

public Microsoft.Bot.Builder.FormFlow.Advanced.Field<T> SetValidate (Microsoft.Bot.Builder.FormFlow.ValidateAsyncDelegate<T> validate);
member this.SetValidate : Microsoft.Bot.Builder.FormFlow.ValidateAsyncDelegate<'T (requires 'T : null)> -> Microsoft.Bot.Builder.FormFlow.Advanced.Field<'T (requires 'T : null)>
Public Function SetValidate (validate As ValidateAsyncDelegate(Of T)) As Field(Of T)
Parameters
Returns

SetValue(T, Object) SetValue(T, Object) SetValue(T, Object)

public virtual void SetValue (T state, object value);
abstract member SetValue : 'T * obj -> unit
override this.SetValue : 'T * obj -> unit
Public Overridable Sub SetValue (state As T, value As Object)
Parameters
state

Template(TemplateUsage) Template(TemplateUsage) Template(TemplateUsage)

public virtual Microsoft.Bot.Builder.FormFlow.TemplateAttribute Template (Microsoft.Bot.Builder.FormFlow.TemplateUsage usage);
abstract member Template : Microsoft.Bot.Builder.FormFlow.TemplateUsage -> Microsoft.Bot.Builder.FormFlow.TemplateAttribute
override this.Template : Microsoft.Bot.Builder.FormFlow.TemplateUsage -> Microsoft.Bot.Builder.FormFlow.TemplateAttribute
Public Overridable Function Template (usage As TemplateUsage) As TemplateAttribute
Parameters
Returns

Terms(Object) Terms(Object) Terms(Object)

public virtual System.Collections.Generic.IEnumerable<string> Terms (object value);
abstract member Terms : obj -> seq<string>
override this.Terms : obj -> seq<string>
Public Overridable Function Terms (value As Object) As IEnumerable(Of String)
Parameters
Returns

ValidateAsync(T, Object) ValidateAsync(T, Object) ValidateAsync(T, Object)

[System.Runtime.CompilerServices.AsyncStateMachine(typeof(Microsoft.Bot.Builder.FormFlow.Advanced.Field`1/<ValidateAsync>d__46))]
public virtual System.Threading.Tasks.Task<Microsoft.Bot.Builder.FormFlow.ValidateResult> ValidateAsync (T state, object value);
abstract member ValidateAsync : 'T * obj -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.FormFlow.ValidateResult>
override this.ValidateAsync : 'T * obj -> System.Threading.Tasks.Task<Microsoft.Bot.Builder.FormFlow.ValidateResult>
Public Overridable Function ValidateAsync (state As T, value As Object) As Task(Of ValidateResult)
Parameters
state
Returns

ValueDescription(Object) ValueDescription(Object) ValueDescription(Object)

public virtual Microsoft.Bot.Builder.FormFlow.DescribeAttribute ValueDescription (object value);
abstract member ValueDescription : obj -> Microsoft.Bot.Builder.FormFlow.DescribeAttribute
override this.ValueDescription : obj -> Microsoft.Bot.Builder.FormFlow.DescribeAttribute
Public Overridable Function ValueDescription (value As Object) As DescribeAttribute
Parameters
Returns

Applies to