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

Interface that defines basic access to a field. More...

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

Interface that defines basic access to a field.

Template Parameters
TThe 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 ( state)

Get this field value from form state.

Parameters
stateForm state to get field value from.
Returns
Current value found in state.

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

bool Microsoft.Bot.Builder.FormFlow.Advanced.IFieldState< T >.IsUnknown ( state)

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

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

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

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

Limits of numeric values.

Parameters
minMinimum possible value.
maxMaximum possible value.
Returns
True if limits limit the underlying data type.

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

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

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

Set this field value in form state to unknown.

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

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

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

Set this field value in form state.

Parameters
stateForm state to set field value in.
valueNew value.

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

Property Documentation

IEnumerable<string> Microsoft.Bot.Builder.FormFlow.Advanced.IFieldState< T >.Dependencies
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.

Test to see if field is nullable.

Returns
True if field is nullable.

Definition at line 99 of file IField.cs.

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.

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.

Gets the type of the field.

The type.

Definition at line 87 of file IField.cs.


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