Share via


IFieldPrompt<T>.DefineAsync(T) Method

Definition

Build the prompt and recognizer for dynamically defined fields.

public System.Threading.Tasks.Task<bool> DefineAsync (T state);
abstract member DefineAsync : 'T -> System.Threading.Tasks.Task<bool>
Public Function DefineAsync (state As T) As Task(Of Boolean)

Parameters

state
T

Returns

True if field is defined.

Remarks

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 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.

Applies to