// Main request execution logic. public ProcessResponse Process(ProcessRequest request) { // set actual timestamp var serviceReceived = DateTime.Now.Ticks; // create response if (args.Verbose) { Console.WriteLine("Requested message: {0}", request.Id); } var response = new ProcessResponse(request) { ServiceReceived = serviceReceived }; // simulation execution InnerProccess(); // set actual timestamp response.ServiceSent = DateTime.Now.Ticks; if (args.Verbose) { Console.WriteLine("Responded message: {0}", request.Id); } return(response); }
public ProcessResponse(ProcessRequest request) { Id = request.Id; Payload = request.Payload; Produced = request.Produced; MapperActivated = request.MapperActivated; MapperConnected = request.MapperConnected; MapperPreDequeued = request.MapperPreDequeued; MapperPostDequeued = request.MapperPostDequeued; MapperReceived = request.MapperReceived; MapperSent = request.MapperSent; }
// Main request execution logic. public ProcessResponse Process(ProcessRequest request) { // set actual timestamp var serviceReceived = DateTime.Now.Ticks; // create response if (args.Verbose) Console.WriteLine("Requested message: {0}", request.Id); var response = new ProcessResponse(request) { ServiceReceived = serviceReceived }; // simulation execution InnerProccess(); // set actual timestamp response.ServiceSent = DateTime.Now.Ticks; if (args.Verbose) Console.WriteLine("Responded message: {0}", request.Id); return response; }