public ActionResult SendMessage(SendRemoteEventModel sendRemoteEventModel)
 {
     int i = 0;
     if (sendRemoteEventModel.EventId != Guid.Empty)
     {
         Event e = Event.Get(sendRemoteEventModel.EventId);
         for (; i < sendRemoteEventModel.NumberOfevents; i++)
         {
             Task.Factory.StartNew(() => e.Raise(RaiserId, sendRemoteEventModel.Param));
         }
         sendRemoteEventModel.NumberOfeventsSent = i;
     }
     else
     {
         sendRemoteEventModel.NumberOfeventsSent = i;
     }
     RemoteEventsModel model = GetRemoteEventModel();
     model.SendRemoteEventModel = sendRemoteEventModel;
     return View("Index", model);
 }
 public RemoteEventsModel()
 {
     RemoteEventModel     = Enumerable.Empty <RemoteEventModel>();
     SendRemoteEventModel = new SendRemoteEventModel();
 }
Пример #3
0
 public RemoteEventsModel()
 {
     RemoteEventModel =    Enumerable.Empty<RemoteEventModel>();
     SendRemoteEventModel = new SendRemoteEventModel();
 }