public IActionResult Parse([FromBody] DataPackage package) { if (package.FileName != null) { var result = ParserCS.Parsing(package.FileName, package.FileContents, package.EntryName == null ? "main" : package.EntryName, package.Shader, package.Language); var data = new DataPackage() { Result = result }; return(Json(data)); } else { return(Json(new DataPackage())); } }
public DataPackage LocalParse(DataPackage package) { if (package.FileName != null) { var result = ParserCS.Parsing(package.FileName, package.FileContents, package.EntryName == null ? "main" : package.EntryName, package.Shader, package.Language); var data = new DataPackage() { Result = result }; return(data); } else { return(null); } }