Пример #1
0
 public void Divide(int a, int pid, int b, DuplexSubprocess <IDuplexCallback> c)
 {
     Console.WriteLine("Divide:{0} / {1} (PID:{2}) (PID:{3})", a, b, pid, c.Id);
     Task.Delay(1000).ContinueWith(t => c.Callback.Report(a / b));
 }
Пример #2
0
 public void Subtract(DuplexSubprocess <IDuplexCallback> c, int a, int b, out int r)
 {
     Console.WriteLine("Subtract:{0} - {1} (PID:{2})", a, b, c.Id);
     Task.Delay(1000).ContinueWith(t => c.Callback.Report(a - b));
     r = a - b;
 }
Пример #3
0
 public void Multipy(int a, DuplexSubprocess <IDuplexCallback> c, int b)
 {
     Console.WriteLine("Multipy:{0} * {1} (PID:{2})", a, b, c.Id);
     Task.Delay(1000).ContinueWith(t => c.Callback.Report(a * b));
 }
Пример #4
0
 public int Add(int a, int b, DuplexSubprocess <IDuplexCallback> c)
 {
     Console.WriteLine("Add:{0} + {1} (PID:{2})", a, b, c.Id);
     Task.Delay(1000).ContinueWith(t => c.Callback.Report(a + b));
     return(a + b);
 }