コード例 #1
0
 static void Register(ContainerBuilder builder, ComponentRegistrationValue registration)
 {
     if (registration.Key != null)
         builder.RegisterType(registration.ConcreteType).Named(registration.Key, registration.InterfaceType);
     else
         builder.RegisterType(registration.ConcreteType).As(registration.InterfaceType);
 }
コード例 #2
0
 static void Register(ContainerBuilder builder, ComponentRegistrationValue registration)
 {
     if (registration.Key != null)
     {
         builder.RegisterType(registration.ConcreteType).Named(registration.Key, registration.InterfaceType);
     }
     else
     {
         builder.RegisterType(registration.ConcreteType).As(registration.InterfaceType);
     }
 }