title: Adjust Unity Dependency injection to use Lazy<T> / Func<T>
body: <p>I'm working on a project that uses Unity Dependancy injection but the load performance is slowly getting worse.  I am trying to adjust the code to utilise <code>Lazy&lt;T&gt;</code> (or <code>Func&lt;T&gt;</code>) so i'm trying to find a way to either register the classes with the container using <code>Lazy&lt;T&gt;</code> (or <code>Func&lt;T&gt;</code>) or have some sort of factory that could either adjust the registered types or the constructor but i am not able to seem to find a possible way to do this</p>
  
  <p>At present i have numerous service classes like </p>
  
  <pre><code>public Service1(IClassLogic&lt;GetReq, GetRes&gt; getClass, IClassLogic&lt;AddReq, AddRes&gt; addClass, IClassLogic&lt;UpdateReq, UpdateRes&gt; updateClass, IClassLogic&lt;DeleteReq, DeleteRes&gt; deleteClass....){...}
  </code></pre>
  
  <p>then i have registrations similar to</p>
  
  <pre><code>container.RegisterType&lt;IClassLogic&lt;GetReq, GetRes&gt;, GetClass&gt;();
  container.RegisterType&lt;IClassLogic&lt;AddReq, AddRes&gt;, AddClass&gt;();
  container.RegisterType&lt;IClassLogic&lt;UpdateReq, UpdateRes&gt;, UpdateClass&gt;();
  container.RegisterType&lt;IClassLogic&lt;DeleteReq, DeleteRes&gt;, DeleteClass&gt;();
  ...
  </code></pre>
  
  <p>Ideally i would like not to have to go an change all the signatures to </p>
  
  <pre><code>public Service1(Lazy&lt;IClassLogic&lt;GetReq, GetRes&gt;&gt; getClass, Lazy&lt;IClassLogic&lt;AddReq, AddRes&gt;&gt; addClass...
  </code></pre>
  
  <p>Any pointers would be greatly appreciated</p>