예제 #1
0
        public static string GenerateApex(MethodDeclarationSyntax ast, int tabSize = 4)
        {
            var generator = new ApexMethodBodyGenerator {
                IndentSize = tabSize
            };

            ast.Body.Accept(generator);
            return(generator.Code.ToString());
        }
예제 #2
0
 public static string GetCodeInsideMethod(this MethodDeclarationSyntax node, int tabSize = 4) =>
 ApexMethodBodyGenerator.GenerateApex(node, tabSize);