title: How to setup a Unity Registration Convention?
body: <p>With structure map, you can register a convention that lets you not just tweak the type, but also intervene during object creation.  How can I do this with Unity.</p>
  
  <pre><code>public class SettingsRegistration : IRegistrationConvention
  {
      public void Process(Type type, Registry registry)
      {
          if (!type.IsAbstract &amp;&amp; typeof(ISettings).IsAssignableFrom(type))
          {
              registry.For(type).Use(x =&gt;
              {
                  var svc = x.GetInstance&lt;ISettingService&gt;();
                  return svc.LoadSetting(type);
              });
          }
      }
  }
  </code></pre>