Exemple #1
0
        public string EventExecute(string data)
        {
            ExecuteEventArgs executeEventArgs = new ExecuteEventArgs {
                Data = data
            };
            EventHandler <ExecuteEventArgs> beforExecute = this.BeforExecute;

            if (beforExecute != null)
            {
                beforExecute.Invoke(this, executeEventArgs);
            }



            EventHandler <ExecuteEventArgs> afterExecute = this.AfterExecute;

            if (afterExecute != null)
            {
                afterExecute.Invoke(this, executeEventArgs);
            }

            return(executeEventArgs.Data);
        }
Exemple #2
0
 private void AfterExecute(object sender, ExecuteEventArgs eventArgs)
 {
     eventArgs.Data += "2";
 }
Exemple #3
0
 private void BeforExecute(object sender, ExecuteEventArgs eventArgs)
 {
     eventArgs.Data += "1";
 }