Exemplo n.º 1
0
 /// <summary>
 /// Adds an async action taking an instance of <c>System.Diagnostics.Stopwatch</c>.
 /// </summary>
 /// <param name="action"></param>
 /// <returns>Self.</returns>
 public Measurement OfAsyncAction(AsyncActionWithStopwatch action)
 {
     ValidateActionAndMeasurement(action);
     _measurementStrategy = new AsyncManualStopwatchStrategy(action);
     return(this);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Adds an action taking an instance of <c>System.Diagnostics.Stopwatch</c>.
 /// </summary>
 /// <param name="action"></param>
 /// <returns>Self.</returns>
 public Measurement OfAction(Action <Stopwatch> action)
 {
     ValidateActionAndMeasurement(action);
     _measurementStrategy = new ManualStopwatchStrategy(action);
     return(this);
 }