public static void Activate() { Container = ServiceContainerFactory.CreateUnityContainer(); Container.RegisterType <IUserRepository, UserRepository>(new ContainerControlledLifetimeManager()); Container.RegisterType <UserContext, UserContext>(new ContainerControlledLifetimeManager()); Container.RegisterType <IMailer, Mailer>(new ContainerControlledLifetimeManager()); #if DEBUG Container.RegisterType <IUserRepository, FakeUserRepository>(new ContainerControlledLifetimeManager()); #endif }
private void ConfigureServices() { services = ServiceContainerFactory.Create(); SetupGeneratorStarterServices(services); SetupViewServices(services); }