Exemplo n.º 1
0
        public IActionResult Post1(IGenericRequest request, GenericResponse response, IEFTPlugin plugin)
        {
            MethodInfo theMethod = plugin.GetType().GetMethod(request.OperationType);

            theMethod.Invoke(plugin, new object[] { request, response });


            // response = plugin.Request(request, response);

            return(Ok(JsonConvert.SerializeObject(response)));
        }
Exemplo n.º 2
0
        public IActionResult PostAsync(GenericRequest request, GenericResponse response, IEFTPlugin plugin)
        {
            response.Result.Status = "processing";
            new Task(() =>
            {
                MethodInfo theMethod = plugin.GetType().GetMethod(request.OperationType);

                response = (GenericResponse)theMethod.Invoke(plugin, new object[] { request, response });
                MongoDatabase.Update(response.Result);
            }).Start();



            Save(response.Result);
            return(Ok(JsonConvert.SerializeObject(response)));
        }