示例#1
0
        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);
        }
示例#2
0
        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);
        }