static void Main(string[] args) { var logger = new Logger(); try { var codeLoader = new CodeLoader("TestCode.asm"); var comp = new Compiler(codeLoader, logger); var program = comp.GetBinaryCode(); File.WriteAllBytes("TestCode.bin", program); File.WriteAllText("TestCode.hex", bitsToVhdlData(program)); } catch (CodeFileNotFoundException) { Console.WriteLine("Nincs fordítandó file\n\n"); } catch (SyntaxErrorException se) { Console.WriteLine(se.Message + Environment.NewLine); Console.WriteLine(String.Join(Environment.NewLine, logger.List())); } catch (CompileErrorException ce) { Console.WriteLine(ce.Message + Environment.NewLine); Console.WriteLine(String.Join(Environment.NewLine, logger.List())); } catch (Exception exp) { Console.WriteLine(exp.Message + Environment.NewLine); Console.WriteLine(exp.StackTrace); } }
public void Test1() { CodeLoader codeLoader = new CodeLoader("./", "xLiAdProjectTemplate"); IConvertService convertService = new ConvertService(codeLoader); var fileItems = convertService.Convert("SampCorp.Abc"); Assert.Pass(); }
private void Form1_Load(object sender, EventArgs e) { try { var solutionPath = System.Configuration.ConfigurationManager.AppSettings["SolutionPath"]; var projectPre = System.Configuration.ConfigurationManager.AppSettings["ProjectPre"]; codeLoader = new CodeLoader(solutionPath, projectPre); convertService = new ConvertService(codeLoader); } catch (Exception ex) { } }
public HomeController(CodeLoader codeLoader, IConvertService convertService, IConfigModel configModel) { this.codeLoader = codeLoader; this.convertService = convertService; this.configModel = configModel; }