// This method is OPTIONAL, you may choose to implement Write and WriteLiteral without use of __razor_writer // and provide another means of invoking Execute. // /// <summary>Executes the template, writing to the provided text writer.</summary> /// <param name=""writer"">The TextWriter to which to write the template output.</param> public void Generate(System.IO.TextWriter writer) { Html = new HtmlHelper (writer); Url = new UrlHelper (); __razor_writer = writer; Execute (); __razor_writer = null; }