def _GenerateEstimatorConstructor(estimator_class_name, variable_types, variable_names, extension_class_name):
    """
    Generates the consructor for the estimator class.
    """
    code = ["\n\npublic {0}(IHostEnvironment env".format(estimator_class_name)]
    # Generate the Constructor parameters
    for variable_type, variable_name in zip(variable_types, variable_names):
        code.append(", {0}.TransformParameter<{1}> {2}".format(extension_class_name, variable_type, variable_name))
    code.extend(
        [
            ", string outputColumn",
            ")\n{"
        ]
    )
    
    # Generate assigning the values in the constructor
    for variable_name in variable_names:
        code.append("\n_{0} = {0};".format(variable_name))
    
    # Add assignments that are always required
    code.extend(
        [
            "\n_outputColumn = outputColumn;",
            "\n_host = env.Register(nameof({0}));".format(estimator_class_name),
            "\n}"
        ]
    )

    return "".join(code)