public static ICompositionContainer Compose(IList <Type> modules)
        {
            if (Container != null)
            {
                return(Container);
            }

            Container = new CompositionContainer();
            Container.Register <ICompositionContainer>(Container);
            Compose(Container, modules);

            return(Container);
        }
示例#2
0
 private static void RegisterServices(ICompositionContainer container)
 {
     container.Register <IUserService, UserService>();
     container.Register <IRoomTypeService, RoomTypeService>();
 }
示例#3
0
 private static void RegisterRepositories(ICompositionContainer container)
 {
     container.Register <IUserRepository, UserRepository>();
     container.Register <IRoomTypeRepository, RoomTypeRepository>();
 }
示例#4
0
 public override void RegisterGlobalServices(ICompositionContainer container)
 {
     container.Register <IHotelApi, HotelApi>();
 }