public static void Invoke(Func <TResponse, TRequest> service, TRequest request) { Console.WriteLine("input:" + request.ToString()); var response = service(request); Console.WriteLine("output:" + response.ToString()); }
public async Task <TResponse> Execute(TRequest req) { LoggerHelper.Write(string.Format("Params: req=[ {0} ]", req?.ToString())); var srv = ServiceProvider.Instance.Get <ISampleService>(); var res = await srv.GetDog(req); return(res); }