Exemple #1
0
 private string[] DoParse(string refactor, string cs, int offset)
 {
     CsGlobalNamespace globals = new CsParser.Parser().Parse(cs);
     Script script = new Parser(refactor).Parse();
     RefactorCommand[] commands = script.Evaluate(new Context(script, globals, cs, offset, 0));
     return (from c in commands select c.ToString()).ToArray();
 }
        private string DoParse(string refactor, string cs, int offset)
        {
            StringWriter writer = new StringWriter();
            ScriptType.Instance.SetWriter(writer);

            CsGlobalNamespace globals = new CsParser.Parser().Parse(cs);
            Script script = new Parser(refactor).Parse();
            script.Evaluate(new Context(script, globals, cs, offset, 0));

            return writer.ToString();
        }