public static BootConfiguration AddServiceToCheck(this BootConfiguration configuration, Type serviceType)
        {
            if (!configuration.ServicesToCheck.Contains(serviceType))
            {
                configuration.ServicesToCheck.Add(serviceType);
            }

            return(configuration);
        }
Exemple #2
0
        public static void Boot(BootConfiguration configuration)
        {
            lock (bootLock)
            {
                if (bootedKernel == null)
                {
                    bootedKernel = new Kernel();
                    bootedKernel.Configuration = configuration;
                    configuration.Out("Booting...");
                    bootedKernel.ServiceLocatorInstance = new NinjectServiceLocator(configuration.Modules);
                    configuration.Out("Loaded Ninject Modules");
                    MappingConfigurationLoader.LoadConfigurations();
                    configuration.Out("Configured Object Mappings");
                    if (configuration.CheckServices)
                    {
                        bootedKernel.CheckServices();
                    }

                    configuration.Out("Boot Complete.");
                }
            }
        }
Exemple #3
0
        public static void Boot(BootConfiguration configuration)
        {
            lock (bootLock)
            {
                if (bootedKernel == null)
                {
                    bootedKernel = new Kernel();
                    bootedKernel.Configuration = configuration;
                    configuration.Out("Booting...");
                    bootedKernel.ServiceLocatorInstance = new NinjectServiceLocator(configuration.Modules);
                    configuration.Out("Loaded Ninject Modules");
                    MappingConfigurationLoader.LoadConfigurations();
                    configuration.Out("Configured Object Mappings");
                    if (configuration.CheckServices)
                    {
                        bootedKernel.CheckServices();
                    }

                    configuration.Out("Boot Complete.");
                }
            }
        }
 public static BootConfiguration VerboseWith(this BootConfiguration configuration, Action <string, object[]> output)
 {
     configuration.VerboseOut = output;
     return(configuration);
 }
 public static BootConfiguration BeVerbose(this BootConfiguration configuration)
 {
     configuration.Verbose = true;
     return(configuration);
 }
 public static BootConfiguration AddNinjectModule(this BootConfiguration configuration, INinjectModule module)
 {
     configuration.Modules.Add(module);
     return(configuration);
 }
 public static BootConfiguration SkipServicesCheck(this BootConfiguration configuration)
 {
     configuration.CheckServices = false;
     return(configuration);
 }