Exemplo n.º 1
0
        public static void Register()
        {
            IoC.Container.Register(Component.For<IRepository>().ImplementedBy<Repository>().LifeStyle.Singleton);
            IoC.Container.Register(Component.For<IAuthorizationProvider>().ImplementedBy<AuthorizationProvider>().LifeStyle.Singleton);

            var containerWrapper = new Agatha.Castle.Container(IoC.Container);
            new ServiceLayerConfiguration(typeof(Components).Assembly, typeof(GetAllUserGroupsRequest).Assembly, containerWrapper).Initialize();
        }
Exemplo n.º 2
0
        public static void Register()
        {
            IoC.Container.Register(Component.For <IRepository>().ImplementedBy <Repository>().LifeStyle.Singleton);
            IoC.Container.Register(Component.For <IAuthorizationProvider>().ImplementedBy <AuthorizationProvider>().LifeStyle.Singleton);

            var containerWrapper = new Agatha.Castle.Container(IoC.Container);

            new ServiceLayerConfiguration(typeof(Components).Assembly, typeof(GetAllUserGroupsRequest).Assembly, containerWrapper).Initialize();
        }