Interface that allows you to create components with a method to clean their states.
Description
The ICleanable interface allows you to create components with a method to clean their states.
Instance methods
ClearAsync
Clears a component’s state.
Task ClearAsync(IContext context)
- context: IContext - (optional) a context to trace execution through a call chain.
Examples
class MyObjectWithState: ICleanable
{
var _state = new Object[]{};
...
public void Clear(IContext context)
{
this._state = new Object[] { };
}
}