private void RegisterNormal(ContainerBuilder buildr, InstanceDef d) { if (d.Interface2 != null) buildr.RegisterType(d.Implementation) .As(d.Interface1) .As(d.Interface2); else if (d.Interface1 != null) buildr.RegisterType(d.Implementation) .As(d.Interface1); else buildr.RegisterType(d.Implementation); }
private void RegisterSingleton(ContainerBuilder buildr, InstanceDef d) { if (d.Interface2 != null) buildr.RegisterType(d.Implementation) .As(d.Interface1) .As(d.Interface2) .SingleInstance(); else if (d.Interface1 != null) buildr.RegisterType(d.Implementation) .As(d.Interface1) .SingleInstance(); else if (d.Interface1 == null) buildr.RegisterType(d.Implementation) .SingleInstance(); }