public void Register(DefaultServiceLocator registry)
        {
            //System.Diagnostics.Debugger.Break(); 
            ConfigureProxyTypes(registry);
            registry.RegisterSingleton<IDirectoryController>(container =>
            {
                return new DefaultDirectoryController();
            });
            registry.RegisterSingleton<LoggerContainer>(container =>
            {
                var logger = new LoggerContainer();
                logger.Add(new DefaultLogger());
                return logger;
            });
            registry.Register<ILogger>(container =>
            {
                return container.Create<LoggerContainer>();
            });
            registry.Register<ILoggerContainer>(container =>
            {
                return container.Create<LoggerContainer>();
            });
            registry.Register<IModuleLoader>(container =>
            {
                return container.Create<SelectiveModuleLoader>();
            });
            registry.Register<IAppDomainFactory>(container =>
            {
                return container.Create<DefaultAppDomainFactory>();
            });
            registry.DeclareSingleton(typeof(ModuleList));
            registry.DeclareSingleton(typeof(RunCommandOnCollection));
            registry.DeclareSingleton(typeof(ExecuteCommandOnCollection));
            registry.DeclareSingleton(typeof(ExecuteBackgroundCommandOnCollection));
            registry.DeclareSingleton(typeof(ReloadCommandOnCollection));
            registry.DeclareSingleton(typeof(DefaultModuleDirectorySupervisor));
            registry.DeclareSingleton(typeof(AssemblyResolver));
            //registry.DeclareSingleton(typeof(DefaultLoader));
            AddCommandHandlersToCollections();

        }
 public void ConfigureProxyTypes(DefaultServiceLocator registry)
 {
     ModuleProxyTypeDictionary dictionary = new ModuleProxyTypeDictionary();
     dictionary.Add(".dll",typeof(ModuleProxy));
     dictionary.Add(".exe",typeof(ModuleProxy));
     dictionary.Add(".fsx",typeof(ModuleProxy));
     dictionary.Add(".vbx",typeof(ModuleProxy));
     dictionary.Add(".csx",typeof(ModuleProxy));
     dictionary.Add(".jsx",typeof(ModuleProxy));
     registry.RegisterSingleton<ModuleProxyTypeDictionary>(container =>
     {
         return dictionary;
     });
 }