Пример #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);