ICleanable

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 component state.

Task ClearAsync(string correlationId)

  • correlationId: string - (optional) transaction id to trace execution through call chain.

Examples

class MyObjectWithState: ICleanable 
{
    var _state = new Object[]{};
    ...
    public void Clear(string correlationId)
    {
        this._state = new Object[] { };
    }
}

See also