annotate Stocks/Stocks.Common/Core/TimedDelegates.cs @ 39:4b8b38d17d24 MetroWPF CTP v0.1

Quick tidy up for ctp 0.1 release
author adminsh@apollo
date Tue, 03 Apr 2012 15:33:18 +0100
parents 57f20ba55884
children
rev   line source
4
57f20ba55884 Fix for webClientShim to use downloadString instead of downloadData
stevenh7776 stevenhollidge@hotmail.com
parents:
diff changeset
1 using System;
57f20ba55884 Fix for webClientShim to use downloadString instead of downloadData
stevenh7776 stevenhollidge@hotmail.com
parents:
diff changeset
2 using System.Diagnostics;
57f20ba55884 Fix for webClientShim to use downloadString instead of downloadData
stevenh7776 stevenhollidge@hotmail.com
parents:
diff changeset
3
57f20ba55884 Fix for webClientShim to use downloadString instead of downloadData
stevenh7776 stevenhollidge@hotmail.com
parents:
diff changeset
4 namespace Stocks.Common.Core
57f20ba55884 Fix for webClientShim to use downloadString instead of downloadData
stevenh7776 stevenhollidge@hotmail.com
parents:
diff changeset
5 {
57f20ba55884 Fix for webClientShim to use downloadString instead of downloadData
stevenh7776 stevenhollidge@hotmail.com
parents:
diff changeset
6 public class TimedDelegates
57f20ba55884 Fix for webClientShim to use downloadString instead of downloadData
stevenh7776 stevenhollidge@hotmail.com
parents:
diff changeset
7 {
57f20ba55884 Fix for webClientShim to use downloadString instead of downloadData
stevenh7776 stevenhollidge@hotmail.com
parents:
diff changeset
8 public static T Execute<T>(
57f20ba55884 Fix for webClientShim to use downloadString instead of downloadData
stevenh7776 stevenhollidge@hotmail.com
parents:
diff changeset
9 Func<T, T> func,
57f20ba55884 Fix for webClientShim to use downloadString instead of downloadData
stevenh7776 stevenhollidge@hotmail.com
parents:
diff changeset
10 T paramIn,
57f20ba55884 Fix for webClientShim to use downloadString instead of downloadData
stevenh7776 stevenhollidge@hotmail.com
parents:
diff changeset
11 out Stopwatch stopwatch)
57f20ba55884 Fix for webClientShim to use downloadString instead of downloadData
stevenh7776 stevenhollidge@hotmail.com
parents:
diff changeset
12 {
57f20ba55884 Fix for webClientShim to use downloadString instead of downloadData
stevenh7776 stevenhollidge@hotmail.com
parents:
diff changeset
13 stopwatch = new Stopwatch();
57f20ba55884 Fix for webClientShim to use downloadString instead of downloadData
stevenh7776 stevenhollidge@hotmail.com
parents:
diff changeset
14 stopwatch.Start();
57f20ba55884 Fix for webClientShim to use downloadString instead of downloadData
stevenh7776 stevenhollidge@hotmail.com
parents:
diff changeset
15 T result = func(paramIn);
57f20ba55884 Fix for webClientShim to use downloadString instead of downloadData
stevenh7776 stevenhollidge@hotmail.com
parents:
diff changeset
16 stopwatch.Stop();
57f20ba55884 Fix for webClientShim to use downloadString instead of downloadData
stevenh7776 stevenhollidge@hotmail.com
parents:
diff changeset
17 return result;
57f20ba55884 Fix for webClientShim to use downloadString instead of downloadData
stevenh7776 stevenhollidge@hotmail.com
parents:
diff changeset
18 }
57f20ba55884 Fix for webClientShim to use downloadString instead of downloadData
stevenh7776 stevenhollidge@hotmail.com
parents:
diff changeset
19 }
57f20ba55884 Fix for webClientShim to use downloadString instead of downloadData
stevenh7776 stevenhollidge@hotmail.com
parents:
diff changeset
20 }