private void ObjectRegister() { INeilContainer container = new NeilContainer(); container.Register <IUserBLL, UserBLL>(); container.Register <IUserDAL, UserDAL>(); container.Register <IServiceA, ServiceA>(); container.Register <IServiceB, ServiceB>(); container.Register <IServiceC, ServiceC>(); container.Register <IServiceD, ServiceD>(); container.Register <IServiceE, ServiceE>(); container.Register <IServiceF, ServiceF>(); //container.Register<IUserBLL, UserBLLV2>(); userDAL = container.CreateObject <IUserDAL>(); userBLL = container.CreateObject <IUserBLL>(); userBLLV2 = new UserBLLV2(); }
static void Main(string[] args) { INeilContainer container = new NeilContainer(); container.Register <IUserBLL, UserBLL>(); container.Register <IUserDAL, UserDAL>(); container.Register <IServiceA, ServiceA>(); container.Register <IServiceB, ServiceB>(); container.Register <IServiceC, ServiceC>(); container.Register <IServiceD, ServiceD>(); container.Register <IServiceE, ServiceE>(); container.Register <IServiceF, ServiceF>(); //container.Register<IUserBLL, UserBLLV2>(); IUserDAL userDAL = container.CreateObject <IUserDAL>(); IUserBLL userBLL = container.CreateObject <IUserBLL>(); IUserBLL userBLLV2 = new UserBLLV2(); Console.ReadLine(); }