Class StopWatchHelper
A helper class for measuring and logging the execution time of an action using a stopwatch.
Implements
Inherited Members
Namespace: Innovt.Core.Utilities
Assembly: Innovt.Core.dll
Syntax
public class StopWatchHelper : IDisposable
Constructors
| Edit this page View SourceStopWatchHelper(ILogger, string)
Initializes a new instance of the StopWatchHelper class with a logger and an action description.
Declaration
public StopWatchHelper(ILogger logger, string action)
Parameters
Type | Name | Description |
---|---|---|
ILogger | logger | The logger used to log the elapsed time. |
string | action | A description of the action being measured. |
Methods
| Edit this page View SourceDispose()
Releases the resources used by the StopWatchHelper instance and logs the elapsed time.
Declaration
public void Dispose()
Dispose(bool)
Releases the resources used by the StopWatchHelper instance and logs the elapsed time.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing | True if called from the Dispose() method, false if called from the finalizer. |
~StopWatchHelper()
Finalizes an instance of the StopWatchHelper class.
Declaration
protected ~StopWatchHelper()