ITimingScope Interface.NET Progress Telerik Platform Analytics Monitor Documentation, API Reference, Online Help | WPF, Silverlight, WinForms, Windows Phone Application Analytics
Encapsulates a scope of a specific feature timing. This can be used to make the timing of a feature more robust to exceptions by enabling scoping of the block of code the is timed.

Namespace: EQATEC.Analytics.Monitor
Assembly: EQATEC.Analytics.Monitor (in EQATEC.Analytics.Monitor.dll) Version: 3.2.144.0 (3.2.144)
Syntax

public interface ITimingScope : IDisposable
Remarks

This class ensures that multiple calls to Complete  and/or Cancel  will only result in a single call to the monitor either completing or cancelling the timing.
Examples

The following shows an example of how you can utilize the ITimingScope to make code more compact.
class SomeHeavyLogic
{   
  private IAnalyticsMonitor m_monitor;
  public SomeHeavyLogic(IAnalyticsMonitor monitor)
  {
    m_monitor = monitor;
  }
  public void StartDoingStuff()
  {
    using (var scope = m_monitor.TrackFeatureStart("Processing.BigData"))
    {
       // This is where the processing should occur

       scope.Complete(); //this completes the timing by call TrackFeatureStop on the feature name
    }
  } 
}
See Also