示例#1
0
 public void Pong(int ticks)
 {
     Console.WriteLine("Pong: Ticks = " + ticks);
     if (ticks != 0)
     {
         //Retrieve the Callback  Channel (in this case the Channel that was used to send the
         //original message) and make an outgoing call until ticks reaches 0.
         IPingPong channel = OperationContext.Current.GetCallbackChannel <IPingPong>();
         channel.Ping((ticks - 1));
     }
 }
示例#2
0
文件: Class1.cs 项目: pepipe/ISEL
 public void FazPingPong(IPingPong pp)
 {
     if (pp.EstPing)
      {
          Console.WriteLine("vai fazer Ping");
          pp.Ping(pp);
          //pp.Ping();
      }
      else
      {
          Console.WriteLine("vai fazer Pong");
          pp.Pong();
      }
      pp.EstPing=!pp.EstPing;
 }
示例#3
0
 public void Ping(IPingPong myself)
 {
     Console.WriteLine("PING"+myself.EstPing);
 }