Example #1
0
        public override void ProcessResource(IResource source,
                                             Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore store,
                                             Castle.MicroKernel.IKernel kernel)
        {
            // default stuff...
            base.ProcessResource(source, store, kernel);

            // custom stuff..auto register all config\*.castle.config files
            var configFilesLocation = SmartLocation.GetLocation("config");

            if (!Directory.Exists(configFilesLocation))
            {
                return;
            }

            ProcessFolder(store, kernel, configFilesLocation);
        }
Example #2
0
        protected void ProcessFolder(Castle.MicroKernel.SubSystems.Configuration.IConfigurationStore store,
                                     Castle.MicroKernel.IKernel kernel,
                                     string path)
        {
            foreach (var extraConfig in Directory.GetFiles(path, "*.castle.config"))
            {
                try
                {
                    var interpreter = new XmlInterpreter(extraConfig);
                    interpreter.ProcessResource(interpreter.Source, store, kernel);
                }
                catch (ConfigurationErrorsException)
                {
                    throw;
                }
                catch (Exception ex)
                {
                    throw new InvalidOperationException("Failed to load configuration: " + extraConfig, ex);
                }
            }

            Directory.GetDirectories(path).ToList().ForEach(folder => ProcessFolder(store, kernel, folder));
        }
Example #3
0
 public WindsorModuleFactory(Castle.MicroKernel.IKernel windsorKernel)
 {
     _windsorKernel = windsorKernel;
 }
        public WindsorViewCatalogService(Castle.MicroKernel.IKernel container)
        {
            _container = container;

            _components = new Lazy<IEnumerable<ComponentDefinition>>(LoadComponents);
        }
Example #5
0
 public static void Setup(Castle.MicroKernel.IKernel kernel)
 {
     _kernel = kernel;
 }
Example #6
0
 public void Dispose()
 {
     container.Dispose();
     container = null;
 }
 public BitPixelDependencyResolver(Castle.MicroKernel.IKernel kernal)
 {
     _kernal = kernal;
 }
Example #8
0
 public WindsorDependencyResolver(Castle.MicroKernel.IKernel container)
 {
     this.container = container;
 }
Example #9
0
 public ServiceContainer(IKernel container, T service)
 {
     _kernel = container;
     Service = service;
 }
Example #10
0
 public WindsorViewFactory(Castle.MicroKernel.IKernel windsorKernel)
 {
     _windsorKernel = windsorKernel;
 }
 public WebsiteDependencyResolver(Castle.MicroKernel.IKernel kernal)
 {
     _kernal = kernal;
 }
 public CryptopiaDependencyResolver(Castle.MicroKernel.IKernel kernal)
 {
     _kernal = kernal;
 }