Pip-Services-Commons-Dotnet
Public Member Functions | List of all members
PipServices3.Commons.Run.ICleanable Interface Reference

Interface for components that should clean their state. More...

Public Member Functions

Task ClearAsync (string correlationId)
 Clears component state. More...
 

Detailed Description

Interface for components that should clean their state.

Cleaning state most often is used during testing. But there may be situations when it can be done in production.

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

Member Function Documentation

◆ ClearAsync()

Task PipServices3.Commons.Run.ICleanable.ClearAsync ( string  correlationId)

Clears component state.

Parameters
correlationId(optional) transaction id to trace execution through call chain.

The documentation for this interface was generated from the following file: