Ejemplo n.º 1
0
        public static string GenerateCSharp(BaseSyntax ast, ApexSharpParserOptions options)
        {
            // set default options
            options = options ?? new ApexSharpParserOptions();

            var generator = new CSharpCodeGenerator
            {
                IndentSize = options.TabSize,
                Namespace  = options.Namespace,
                UseLocalSObjectsNamespace = options.UseLocalSObjectsNamespace,
            };

            ast.Accept(generator);
            return(generator.Code.ToString());
        }
Ejemplo n.º 2
0
 public static string ToCSharp(this BaseSyntax node, ApexSharpParserOptions options) =>
 CSharpCodeGenerator.GenerateCSharp(node, options);
Ejemplo n.º 3
0
 public static string ToCSharp(this BaseSyntax node, int tabSize = 4, string @namespace = null) =>
 CSharpCodeGenerator.GenerateCSharp(node, tabSize, @namespace);