コード例 #1
0
 private void StartPublishing(NomadAllModulesLoadedMessage obj)
 {
     Console.WriteLine("All modules loading, now publishing.");
     for (int i = 0; i < 5; i++)
     {
         string payload = "Sample Message " + i;
         var message = new DistributableMessage(payload);
         _aggregator.Publish(message);
     }
 }
コード例 #2
0
 private void CallBack(DistributableMessage obj)
 {
     ++_counter;
     Console.WriteLine("Listener got message with content: {0}", obj.Payload);
     Console.WriteLine("Listener counter: {0}", _counter);
 }