Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IControl

Defines a Control object that manages state and dialog behavior.

This is the minimal definition required by the Runtime (ControlHandler) See Control for the actual class used by Control implementations.

Hierarchy

Implemented by

Properties

id

id: string

Methods

canHandle

  • Determines if the Control or one of its children can consume the request.

    Parameters

    Returns boolean | Promise<boolean>

canTakeInitiative

  • canTakeInitiative(input: IControlInput): boolean | Promise<boolean>
  • Determines if the Control can take the initiative.

    Parameters

    Returns boolean | Promise<boolean>

getSerializableState

  • getSerializableState(): any
  • Gets the Control's state as an object that is serializable.

    Framework behavior:

    • The object will be serialized via a call to JSON.stringify(obj)

    Returns any

handle

  • Handles the request.

    Parameters

    Returns void | Promise<void>

reestablishState

  • reestablishState(state: any, controlStateMap: object): void
  • TODO

    Parameters

    • state: any
    • controlStateMap: object
      • [index: string]: any

    Returns void

setSerializableState

  • setSerializableState(serializedState: any): void
  • Sets the state from a serialized state object

    Parameters

    • serializedState: any

    Returns void

takeInitiative

  • Takes the initiative by adding an InitiativeAct to the result.

    Parameters

    Returns void | Promise<void>