title: Injecting an IPrincipal with Unity Property Injection at runtime
body: <p>Using Unity in an ASP.Net MVC 2 app I have various dependencies on Controllers instantiated correctly. However, I want to ensure that the current IPrincipal for the user is going to be passed via injection to lower level Services, Repository etc. </p>
  
  <p>Therefore in a lower level service I have something like:</p>
  
  <pre><code>[Dependency] IPrincipal CurrentUser {get; set;}
  </code></pre>
  
  <p>If I use Property Dependency Injection I do not get what I want because the Controller is instantiated BEFORE a User principal is available and in any case Unity does not know to get the current user credentials.</p>
  
  <p>So what I want is to be able to inject the current user's IPrincipal (or probably RolePrincipal) into one of the dependencies for the Controller.</p>
  
  <p>How can I do this?</p>