Esempio n. 1
0
 public void Invoke2()
 {
     ProcessData data = new ProcessData();
     Action<int, int> myAction = (x, y) => Console.WriteLine(x + y);
     Action<int, int> myMultiplyAction = (x, y) => Console.WriteLine(x * y);
     data.ProcessAction(2, 3, myAction);
 }
Esempio n. 2
0
 public void Invoke1()
 {
     ProcessData data = new ProcessData();
     BizRulesDelegate addDel = (x, y) => x + y;
     BizRulesDelegate multipleDel = (x, y) => x * y;
     data.Process(2, 3, addDel);
 }
Esempio n. 3
0
 public void Invoke3()
 {
     ProcessData data = new ProcessData();
     Func<int, int, int> funcAddDel = (x, y) => x + y;
     Func<int, int, int> funcMultiplyDel = (x, y) => x * y;
     data.ProcessFunc(1, 2, funcMultiplyDel);
     data.ProcessFunc(1, 2, (x, y) =>
     {
         x += 15;
         y += 2;
         return x / y;
     });
 }