Beispiel #1
0
        // GET: api/GrafoApi/5
        public string Get(string id)
        {
            string          caminho   = HttpContext.Current.Server.MapPath(string.Format("~/Content/Upload/{0}.txt", id));
            List <Resposta> respostas = Algoritimos.ExecutaComandos(caminho);
            string          resp      = new JavaScriptSerializer().Serialize(respostas);

            return(resp);
        }
        public JsonResult ExecutaGrafo()
        {
            List <Resposta> respostas = Algoritimos.ExecutaComandos(Server.MapPath("~/Content/Upload/grafo-teste-1.txt"));

            return(Json(respostas, JsonRequestBehavior.AllowGet));
        }