T4toolbox中T4 Generator的用途是什么

我正在使用T4toolbox,我很困惑发电机的用途。我可以运行以下内容
public class Generator1 : Generator
{

    protected override void RunCore()
    {

        Template1 t = new Template1();
        t.Output.File = "t3.txt";
        t.Render();

    }
}
或者我可以直接运行t4脚本,如下所示。
Template1 t = new Template1();

t.Output.File = "t3.txt";

t.Render();
但我也可以使用没有生成器的t4脚本来做同样的事情。 所以我的意思是可以用两种方法做同样的事情“脚本 - >生成器 - >模板”和“脚本 - >模板”,我错过了什么?     
已邀请:
当想要封装多个模板时,Generator类很有用。更多信息:http://www.olegsych.com/2008/09/t4-tutorial-creating-complex-code-generators/     

要回复问题请先登录注册