close static method
Closes multiple components.
To be closed components must implement ICloseable
interface.
If they don't the call to this method has no effect.
context
(optional) a context to trace execution through call chain.components
the list of components that are to be closed. Returns Future that receives error or null no errors occured.
Implementation
static Future close(IContext? context, List? components) async {
if (components == null) return;
for (var component in components) {
await Closer.closeOne(context, component);
}
}