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)); } }
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)); } }