Toasts – Blame information for rev 53

Subversion Repositories:
Rev:
Rev Author Line No. Line
53 office 1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using System.Threading.Tasks;
6 using System.Windows.Forms;
7  
8 namespace Toasts.Utilities
9 {
10 public static class Extensions
11 {
12 public static void InvokeIfRequired<T>(this T control, Action<T> action) where T : Control
13 {
14 if (control.InvokeRequired)
15 {
16 control.BeginInvoke((MethodInvoker)delegate { action(control); });
17 return;
18 }
19  
20 action(control);
21 }
22  
23  
24 }
25 }