예제 #1
0
 public virtual void AddAction()
 {
     MainAction action = new MainAction("Publish", "producer");
     action.Runnable = () => {
         foreach(TestClientInfo tci in ProducersInfo)
         {
             NetBrokerMessage brokerMessage = new NetBrokerMessage( Payload );
             if( PublishDestinationType.Equals( NetAction.DestinationType.TOPIC ) )
             {
                 tci.brokerClient.Publish(brokerMessage, this.DestinationName);
             }
             else
             {
                 tci.brokerClient.Enqueue(brokerMessage, this.DestinationName);
             }
             tci.brokerClient.Close();
         }
         action.Sucess = true;
         action.Done = true;
     };
     this.SetAction(action);
 }
예제 #2
0
 public void SetAction(MainAction action)
 {
     lock (this)
         this.action = action;
 }
예제 #3
0
 public void SetAction(MainAction action)
 {
     lock (this)
         this.action = action;
 }