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

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

## Public Member Functions

object GetValue (T state)
Get this field value from form state. More...

bool IsUnknown (T state)
Test to see if the field value form state has a value. More...

bool Limits (out double min, out double max)
Limits of numeric values. More...

void SetUnknown (T state)
Set this field value in form state to unknown. More...

void SetValue (T state, object value)
Set this field value in form state. More...

## Properties

IEnumerable< string > Dependencies [get]
Returns the other fields this one depends on. More...

bool IsNullable [get]
Test to see if field is nullable. More...

bool Optional [get]
Test to see if field is optional which means that an unknown value is legal. More...

string Pattern [get]
Regular expression for validating a string. More...

Type Type [get]
Gets the type of the field. More...

## Detailed Description

Template Parameters
 T The form state that is read or written to.

Definition at line 46 of file IField.cs.

## Member Function Documentation

 object Microsoft.Bot.Builder.FormFlow.Advanced.IFieldState< T >.GetValue ( T state )

Get this field value from form state.

Parameters
 state Form state to get field value from.
Returns
Current value found in state.
 bool Microsoft.Bot.Builder.FormFlow.Advanced.IFieldState< T >.IsUnknown ( T state )

Test to see if the field value form state has a value.

Parameters
 state Form state to check.
Returns
True if value is unknown.

For value types (numbers, bools, date time) a value is unknown only if the field is nullable and it is null. For enum based values (both simple and enumerated) they can also be nullable or the 0 enum value if not nullable. For non value types like string the test is to see if the field is actually null.

 bool Microsoft.Bot.Builder.FormFlow.Advanced.IFieldState< T >.Limits ( out double min, out double max )

Limits of numeric values.

Parameters
 min Minimum possible value. max Maximum possible value.
Returns
True if limits limit the underlying data type.

This typically reflects the result of setting NumericAttribute limits on the possible values.

 void Microsoft.Bot.Builder.FormFlow.Advanced.IFieldState< T >.SetUnknown ( T state )

Set this field value in form state to unknown.

Parameters
 state Form state with field value to set to unknown.

For value types (numbers, bools, date time) the value is set to null if nullable. For enum types it is set to null if nullable or 0 if not. For non value types like string set the value to null.

 void Microsoft.Bot.Builder.FormFlow.Advanced.IFieldState< T >.SetValue ( T state, object value )

Set this field value in form state.

Parameters
 state Form state to set field value in. value New value.

## Property Documentation

get

Returns the other fields this one depends on.

Returns
List of field names this one depends on.

This is mainly useful for Advanced.Confirmation<T> fields.

Definition at line 123 of file IField.cs.

get

Test to see if field is nullable.

Returns
True if field is nullable.

Definition at line 99 of file IField.cs.

get

Test to see if field is optional which means that an unknown value is legal.

Returns
True if field is optional.

Definition at line 93 of file IField.cs.

get

Regular expression for validating a string.

Returns
Validation regular expression.

This typically reflects the result of setting PatternAttribute.

Definition at line 116 of file IField.cs.