public void ChainConstructorsFromBaseType(BooClassBuilder builder) { foreach (IConstructor constructor in TypeSystemExtensions.GetConstructors(builder.get_Entity().get_BaseType())) { ExpressionStatement statement = this.get_CodeBuilder().CreateSuperConstructorInvocation(constructor); MethodInvocationExpression expression = statement.get_Expression() as MethodInvocationExpression; BooMethodBuilder builder2 = builder.AddConstructor(); int index = 0; IParameter[] parameters = constructor.GetParameters(); int length = parameters.Length; while (index < length) { ParameterDeclaration declaration = builder2.AddParameter(parameters[index].get_Name(), parameters[index].get_Type()); expression.get_Arguments().Add(this.get_CodeBuilder().CreateReference(declaration)); index++; } builder2.get_Body().Add(statement); } }