public void Setup()
 {
     // Create the basic factory with defaults
     factory = new TemplateFactory();
     factory.RegisterIncludePattern("{0}.template");
     factory.Register("Var1", "var1", typeof(string));
 }
    /// <summary>
    /// Executes the tool with the given parameters.
    /// </summary>
    public void Process(string [] args)
    {
        // Create a template factory
        TemplateFactory factory = new TemplateFactory();
        factory.TemporaryFile = outputFile;
        factory.DeleteTemporaryFile = false;
        factory.CompileAssembly = false;
        factory.ExtendClassName = extendclass;
        factory.NamespaceName = ns;
        factory.ClassName = classname;

        // Parse the file, create the file, but don't compile
        using (TextReader reader = templateFile.OpenText())
        {
            factory.Create(reader, templateFile.FullName);
        }
    }