Beispiel #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);
        }
Beispiel #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));
        }
 public WindsorModuleFactory(Castle.MicroKernel.IKernel windsorKernel)
 {
     _windsorKernel = windsorKernel;
 }
        public WindsorViewCatalogService(Castle.MicroKernel.IKernel container)
        {
            _container = container;

            _components = new Lazy<IEnumerable<ComponentDefinition>>(LoadComponents);
        }
Beispiel #5
0
 public static void Setup(Castle.MicroKernel.IKernel kernel)
 {
     _kernel = kernel;
 }
Beispiel #6
0
 public void Dispose()
 {
     container.Dispose();
     container = null;
 }
 public BitPixelDependencyResolver(Castle.MicroKernel.IKernel kernal)
 {
     _kernal = kernal;
 }
Beispiel #8
0
 public WindsorDependencyResolver(Castle.MicroKernel.IKernel container)
 {
     this.container = container;
 }
Beispiel #9
0
 public ServiceContainer(IKernel container, T service)
 {
     _kernel = container;
     Service = service;
 }
Beispiel #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;
 }