StephaneLenclud@210: // StephaneLenclud@210: StephaneLenclud@210: using System.Runtime.Serialization; StephaneLenclud@210: StephaneLenclud@210: StephaneLenclud@210: namespace SharpLib.Ear StephaneLenclud@210: { StephaneLenclud@210: [DataContract] StephaneLenclud@210: public abstract class ActionCallback : Action StephaneLenclud@210: { StephaneLenclud@210: public delegate void Delegate(); StephaneLenclud@210: StephaneLenclud@210: private readonly Delegate iCallback; StephaneLenclud@210: StephaneLenclud@210: public ActionCallback(Delegate aCallback = null) StephaneLenclud@210: { StephaneLenclud@210: iCallback = aCallback; StephaneLenclud@210: } StephaneLenclud@210: StephaneLenclud@210: public override void Execute() StephaneLenclud@210: { StephaneLenclud@210: if (iCallback != null) StephaneLenclud@210: { StephaneLenclud@210: iCallback.Invoke(); StephaneLenclud@210: } StephaneLenclud@210: } StephaneLenclud@210: } StephaneLenclud@210: StephaneLenclud@210: }