image— type: docs title: “Cleaner” linkTitle: “Cleaner” gitUrl: “https://github.com/pip-services4/pip-services4-dart/tree/main/pip-services4-components-dart" description: > Helper class that allows you to clear the state of components.

Description

The Cleaner class allows you to clear the state of components.

Static methods

clear

Clears state of multiple components.

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

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

clearOne

Clears the state of a specific component. To be cleaned, state components must implement ICleanable interface. If they don’t, the call to this method has no effect.

static Future clearOne(IContext? context, component)

See also