Show / Hide Table of Contents

Class OperationTracker

Façade for the Activity tracking class

Inheritance
object
OperationTracker
Implements
IDisposable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOffice.Util
Assembly: SoCore.dll
Syntax
public class OperationTracker : IDisposable
Remarks

The AddInfo(string, object) method does intelligent, shallow decoding of objects and arrays to try to generate a reasonable amount of information in the tracking log. You should generally not have to do your own object.ToString() decoding, unless you have special needs. Beware of writing complicated formatting code that slows down the application or creates a huge number of strings on the heap!

Constructors

OperationTracker(string)

Constructor to create a Tracker

Declaration
public OperationTracker(string trackerName)
Parameters
Type Name Description
string trackerName
Remarks

The AddInfo(string, object) method does intelligent, shallow decoding of objects and arrays to try to generate a reasonable amount of information in the tracking log. You should generally not have to do your own object.ToString() decoding, unless you have special needs. Beware of writing complicated formatting code that slows down the application or creates a huge number of strings on the heap!

Methods

AddInfo(string, object)

Add information to the key/value property bag in the tracker. Existing key will have its value replaced. See remarks for ValueToString(object) for object formatting!

Declaration
public void AddInfo(string key, object value)
Parameters
Type Name Description
string key

Property name

object value

Value to be added, will be formatted by ValueToString(object)

Remarks

The AddInfo(string, object) method does intelligent, shallow decoding of objects and arrays to try to generate a reasonable amount of information in the tracking log. You should generally not have to do your own object.ToString() decoding, unless you have special needs. Beware of writing complicated formatting code that slows down the application or creates a huge number of strings on the heap!

Dispose()

Dispose of the tracker, stopping the Activity

Declaration
public void Dispose()
Remarks

The AddInfo(string, object) method does intelligent, shallow decoding of objects and arrays to try to generate a reasonable amount of information in the tracking log. You should generally not have to do your own object.ToString() decoding, unless you have special needs. Beware of writing complicated formatting code that slows down the application or creates a huge number of strings on the heap!

ValueToString(object)

Decode and format objects to a reasonable level

Declaration
public static string ValueToString(object value)
Parameters
Type Name Description
object value

Value to be decoded

Returns
Type Description
string
Remarks

Primitive types are converted to strings directly. One-dimensional Arrays will decode the first three elements. Complex types will only show the type name, to avoid the huge recursive descent that is present in generated service objects.

Implements

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