Show / Hide Table of Contents

Class SoTimeLogger

Disposable class used for logging timing operations being carried out by NetServer

Inheritance
object
SoTimeLogger
Implements
ISoTimeRecorderContext
IDisposable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
Namespace: SuperOffice.Diagnostics
Assembly: SoCore.dll
Syntax
public sealed class SoTimeLogger : 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
int
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()

Increment the build in counter

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
[Obsolete("Background processing now stops by itself", false)]
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.

Implements

ISoTimeRecorderContext
IDisposable

Extension Methods

EnumUtil.MapEnums<From, To>(From)
Converters.MapEnums<From, To>(From)
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top