コード例 #1
0
ファイル: Core.cs プロジェクト: i24mm5731n/WebTool
        public Core()
        {
            //init basics
            _kernel = new StandardKernel();
            log4net.Config.XmlConfigurator.ConfigureAndWatch(new FileInfo("Log4Net.config"));
            _log = LogManager.GetLogger(typeof(Core));
            _kernel.Load(AppDomain.CurrentDomain.GetAssemblies());
            _kernel.Bind<ILog>().ToConstant(_log);
            _log.Info(String.Format("Loaded {0} modules...", _kernel.GetModules().Count()));
            _log.Debug(String.Format("Loaded: {0}\n", _kernel.GetModules().Select(x => x.Name + "\n")));

            ObjectLocator.RegisterObject(_kernel);

            ObjectLocator.RegisterObject(_log);
            //init framework
            _siteGraphManager = SiteGraphManager.GetInstance();
        }
コード例 #2
0
 public static SiteGraphManager GetInstance()
 {
     return _instance ?? (_instance = new SiteGraphManager());
 }