author | StephaneLenclud |
Sun, 26 Feb 2017 18:00:10 +0100 | |
changeset 280 | f90d1e101932 |
parent 228 | 6a84d8282226 |
permissions | -rw-r--r-- |
1 //
3 using System.Runtime.Serialization;
4 using System.Threading.Tasks;
6 namespace SharpLib.Ear
7 {
8 [DataContract]
9 public abstract class ActionCallback : Action
10 {
11 public delegate void Delegate();
13 private readonly Delegate iCallback;
15 public ActionCallback(Delegate aCallback = null)
16 {
17 iCallback = aCallback;
18 }
20 protected override async Task DoExecute()
21 {
22 if (iCallback != null)
23 {
24 iCallback.Invoke();
25 }
26 }
27 }
29 }