Class SoTimeLogger
Disposable class used for logging timing operations being carried out by NetServer
Namespace: SuperOffice.Diagnostics
Assembly: SoCore.dll
Syntax
public sealed class SoTimeLogger : Object, ISoTimeRecorderContext, IDisposable
Remarks
Start timings using Start(SoTimerType, String, DeferredToString).
Timings are logged to file if the Time logging is turned on in the configuration file.
Constructors
SoTimeLogger(String, Func<String>)
Create a new timer object and start measuring time.
Declaration
public SoTimeLogger(string category, Func<string> description)
Parameters
Type | Name | Description |
---|---|---|
String | category | Category like: Database, Services, WebRequest, etc. |
Func<String> | description | Information about what is currently being timed. |
Remarks
Start timings using Start(SoTimerType, String, DeferredToString).
Timings are logged to file if the Time logging is turned on in the configuration file.
Properties
Count
Disposable class used for logging timing operations being carried out by NetServer
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
Int32 |
Remarks
Start timings using Start(SoTimerType, String, DeferredToString).
Timings are logged to file if the Time logging is turned on in the configuration file.
Elapsed
Get the elapsed time without further ado.
Declaration
public TimeSpan Elapsed { get; }
Property Value
Type | Description |
---|---|
TimeSpan |
Remarks
Start timings using Start(SoTimerType, String, DeferredToString).
Timings are logged to file if the Time logging is turned on in the configuration file.
Methods
Dispose()
Disposable class used for logging timing operations being carried out by NetServer
Declaration
public void Dispose()
Remarks
Start timings using Start(SoTimerType, String, DeferredToString).
Timings are logged to file if the Time logging is turned on in the configuration file.
End()
Stop the timer and obtain the time since the start of the timing.
Declaration
public void End()
Remarks
Start timings using Start(SoTimerType, String, DeferredToString).
Timings are logged to file if the Time logging is turned on in the configuration file.
Increment()
Disposable class used for logging timing operations being carried out by NetServer
Declaration
public void Increment()
Remarks
Start timings using Start(SoTimerType, String, DeferredToString).
Timings are logged to file if the Time logging is turned on in the configuration file.
Lap(Func<String>)
Perform a lap operation and see the time since the previous lap.
Declaration
public void Lap(Func<string> description)
Parameters
Type | Name | Description |
---|---|---|
Func<String> | description | Information about the lap. |
Remarks
Start timings using Start(SoTimerType, String, DeferredToString).
Timings are logged to file if the Time logging is turned on in the configuration file.
Split(Func<String>)
Perform a split operation to see how long time was spent since the the timer was started.
Declaration
public void Split(Func<string> description)
Parameters
Type | Name | Description |
---|---|---|
Func<String> | description | Information about the split time. |
Remarks
Start timings using Start(SoTimerType, String, DeferredToString).
Timings are logged to file if the Time logging is turned on in the configuration file.
Stop()
Disposable class used for logging timing operations being carried out by NetServer
Declaration
public static void Stop()
Remarks
Start timings using Start(SoTimerType, String, DeferredToString).
Timings are logged to file if the Time logging is turned on in the configuration file.