Closer

Helper class that allows you to close one or multiple components at the same time.

Description

The Closer class allows you to close one or multiple components at the same time.

Static methods

close

Closes multiple components.

To be closed, components must implement the IClosable interface. If they don’t, the call to this method has no effect.

static Future close(IContext? context, List? components)

  • context: IContext - (optional) a context to trace execution through a call chain.
  • components: List? - list of components that are to be closed.
  • returns: Future - that receives error or null no errors occured.

closeOne

Closes a specific component. To be closed, components must implement the IClosable interface. If they don’t, the call to this method has no effect.

static Future closeOne(IContext? context, component)

  • context: IContext - (optional) a context to trace execution through a call chain.
  • component: dynamic - component that is to be closed.

See also