예제 #1
0
 public SeederContainer(params NinjectModule[] ninjectModules)
 {
     // note:  I like limiting the usage of the container to only
     //        the root of the application.  otherwise you could end up
     //        with less experienced devs passing the kernel all over the
     //        place and implementing the service locator anti-pattern.
     try
     {
         var kernel = new StandardKernel();
         kernel.Load(new SeederModule());
         kernel.Load(ninjectModules);
         _seedCoordinator = kernel.Get <ISeedCoordinator>();
     }
     catch (Exception exception)
     {
         throw new IocInitializationException(exception);
     }
 }
 public PersonSeederController(ISeedCoordinator seedCoordinator,
                               CapturingLoggerFactoryAdapter capturingLoggerAdapter)
 {
     _seedCoordinator        = seedCoordinator;
     _capturingLoggerAdapter = capturingLoggerAdapter;
 }