public static ConstructorStatement Ctor(this ClassStatement classStatement, Action<BlockStatement> block)
        {
            var blockStatement = new BlockStatement();
            block(blockStatement);

            var ctorStatement = new ConstructorStatement(classStatement.CsType, blockStatement);
            classStatement.AddConstructor(ctorStatement);
            return ctorStatement;
        }
Example #2
0
 public void AddConstructor(ConstructorStatement constructorStatement)
 {
     body.AddStatement(constructorStatement);
 }