title: Access Host object from T4 class
body: <p>When I try to access the Host object from a non-static method declared in &lt;#+#> brackets, everything works ok. But I need to access it from a class method, like this:</p>
  
  <pre><code>&lt;#+
  public class ProjectTraverser
  {
      public void Traverse()
      {
          var a = Host;
      }
  }
  #&gt;
  </code></pre>
  
  <p>I get the following error when this template executes: <em>"Compiling transformation: Cannot access a non-static member of outer type 'Microsoft.VisualStudio.TextTemplating7D03DF372FEAC3D3A28C011A41F02403.GeneratedTextTransformation' via nested type 'Microsoft.VisualStudio.TextTemplating7D03DF372FEAC3D3A28C011A41F02403.GeneratedTextTransformation.ProjectTraverser' d:\Projects\Test Solutions\GettingStarted\TelerikMvc3RazorApplication\TextTemplate2.tt"</em></p>
  
  <p>Please share any ideas.</p>