Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }