comparison Stocks/Stocks.Common/Core/TimedDelegates.cs @ 4:57f20ba55884

Fix for webClientShim to use downloadString instead of downloadData Refactoring and introduction of static TimedDelegates.Execute() helper method
author stevenh7776 stevenhollidge@hotmail.com
date Mon, 20 Feb 2012 23:04:58 +0700
parents
children
comparison
equal deleted inserted replaced
3:ef54074d5285 4:57f20ba55884
1 using System;
2 using System.Diagnostics;
3
4 namespace Stocks.Common.Core
5 {
6 public class TimedDelegates
7 {
8 public static T Execute<T>(
9 Func<T, T> func,
10 T paramIn,
11 out Stopwatch stopwatch)
12 {
13 stopwatch = new Stopwatch();
14 stopwatch.Start();
15 T result = func(paramIn);
16 stopwatch.Stop();
17 return result;
18 }
19 }
20 }