示例#1
0
        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()));
            }
        }
示例#2
0
        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);
            }
        }