public Assembly Compile(string FileName, string ReferenceRoot) { CompilerResults results = FormulaSpace.Compile("using Easychart.Finance;\r\nusing Easychart.Finance.DataProvider;\r\n" + this.GetSource(""), FileName, ReferenceRoot); this.StartLineNum = 2; if (results.Errors.Count > 0) { for (int i = 0; i < results.Errors.Count; i++) { CompilerError ce = results.Errors[i]; this.AdjustErrors(ce); } throw new FormulaErrorException(results.Errors); } return(results.CompiledAssembly); }
public Assembly Compile(string FileName, string ReferenceRoot) { CompilerResults cr = FormulaSpace.Compile( "using Easychart.Finance;\r\n" + "using Easychart.Finance.DataProvider;\r\n" + GetSource(""), FileName, ReferenceRoot); StartLineNum = 2; if (cr.Errors.Count > 0) { for (int i = 0; i < cr.Errors.Count; i++) { System.CodeDom.Compiler.CompilerError ce = cr.Errors[i]; AdjustErrors(ce); } throw new FormulaErrorException(null, cr.Errors); } return(cr.CompiledAssembly); }