Microsoft.Bot.Builder.FormFlow.Advanced.IFieldPrompt< T > Interface Template Reference

This provides control information about a field. More...

Inheritance diagram for Microsoft.Bot.Builder.FormFlow.Advanced.IFieldPrompt< T >:

Public Member Functions

bool Active (T state)
 Test to see if field is currently active based on the current state. More...
 
Task< bool > DefineAsync (T state)
 Build the prompt and recognizer for dynamically defined fields. More...
 
NextStep Next (object value, T state)
 Next step to execute. More...
 
TemplateAttribute Template (TemplateUsage usage)
 Return a template for building a prompt. More...
 
Task< ValidateResultValidateAsync (T state, object value)
 Validate value to be set on state and return feedback if not valid. More...
 

Properties

IPrompt< T > Help [get]
 Return the help description for this field. More...
 
IPrompt< T > Prompt [get]
 Returns the prompt description. More...
 

Detailed Description

This provides control information about a field.

Template Parameters
TForm state that is being completed.
Type Constraints
T :class 

Definition at line 329 of file IField.cs.

Member Function Documentation

Test to see if field is currently active based on the current state.

Returns
True if field is active.

One way to control this is to supply a ActiveDelegate<T> to the IFormBuilder<T>.Field or IFormBuilder<T>.Confirm steps.

Implemented in Microsoft.Bot.Builder.FormFlow.Advanced.Field< T >, and Microsoft.Bot.Builder.FormFlow.Advanced.Confirmation< T >.

Task<bool> Microsoft.Bot.Builder.FormFlow.Advanced.IFieldPrompt< T >.DefineAsync ( state)

Build the prompt and recognizer for dynamically defined fields.

Returns
True if field is defined.

This method is called before asking for Prompt. This provides an opportunity to dynamically define the field based on the current state or external information. The IFieldState<T>.Dependencies method identifies fields that this one depends on. All of them will be complete before the field will be shown to the user, but this method might be called earlier in order to define the field for things like status and initial matching or validation.

Implemented in Microsoft.Bot.Builder.FormFlow.Advanced.Field< T >.

NextStep Microsoft.Bot.Builder.FormFlow.Advanced.IFieldPrompt< T >.Next ( object  value,
state 
)

Next step to execute.

Parameters
valueValue in response to prompt.
stateCurrent form state.
Returns
Next step to execute.

Implemented in Microsoft.Bot.Builder.FormFlow.Advanced.Field< T >, and Microsoft.Bot.Builder.FormFlow.Advanced.Confirmation< T >.

Return a template for building a prompt.

Parameters
usageKind of template we are looking for.
Returns
NULL if no template, otherwise a template annotation.

Implemented in Microsoft.Bot.Builder.FormFlow.Advanced.Field< T >.

Task<ValidateResult> Microsoft.Bot.Builder.FormFlow.Advanced.IFieldPrompt< T >.ValidateAsync ( state,
object  value 
)

Validate value to be set on state and return feedback if not valid.

Parameters
stateState before setting value.
valueValue to be set in field.
Returns
Result including feedback and if valid.

One way to control this is to supply a ValidateAsyncDelegate<T> to the IFormBuilder<T>.Field or IFormBuilder<T>.Confirm steps.

Implemented in Microsoft.Bot.Builder.FormFlow.Advanced.Field< T >.

Property Documentation

Return the help description for this field.

Returns
The prompt to use for generating help.

Help is a mixture of field specific help, what a recognizer understands and available commands.

Definition at line 389 of file IField.cs.

Returns the prompt description.

Returns
An IPrompt<T> describing prompt and recognizer.

If a prompt is dynamically computed this should be null until DefineAsync(T) is called.

Definition at line 354 of file IField.cs.


The documentation for this interface was generated from the following file: