Exemple #1
0
 public void Execute()
 {
     try
     {
         var response = _func.Invoke(_request);
         _scatter.AddResponse(ParticipantId, ScatterResponse <TResponse> .Success(ParticipantId, _name, response));
     }
     catch (Exception e)
     {
         _scatter.AddResponse(ParticipantId, ScatterResponse <TResponse> .Error(ParticipantId, _name, e));
     }
 }
Exemple #2
0
 public static void GetResponses(Guid id, IParticipantReference <TRequest, TResponse> func, Envelope <TRequest> request, IGatherReceiver <TResponse> scatter, string name)
 {
     try
     {
         var response = func.Invoke(request);
         scatter.AddResponse(id, ScatterResponse <TResponse> .Success(id, name, response));
     }
     catch (Exception e)
     {
         scatter.AddResponse(id, ScatterResponse <TResponse> .Error(id, name, e));
     }
 }