public static String WriteStatement(IStatement statement) { TestWriter writer = new TestWriter(); CSharpWriter cSharpWriter = new CSharpWriter(); cSharpWriter.GetType().GetMethod("WriteStatement", BindingFlags.NonPublic | BindingFlags.Static).Invoke(cSharpWriter, new object[] { statement, writer }); return(writer.String); }
public static String WriteExpression(Expression expression) { TestWriter writer = new TestWriter(); CSharpWriter cSharpWriter = new CSharpWriter(); cSharpWriter.GetType().GetMethod("WriteExpression", BindingFlags.NonPublic | BindingFlags.Static).Invoke(cSharpWriter, new object[] { expression, writer }); return(writer.String); }