Exemple #1
0
        /// <summary>
        /// 执行初始化
        /// </summary>
        public void Initialize()
        {
            if (MvcIocInitializer == null)
            {
                throw new InvalidCastException("MVC初始化器不能为空,请为FrameworkInitializer.MvcIocInitializer属性赋值");
            }
            OSharpConfig config = OSharpConfig.Instance;

            BasicLoggingInitializer.Initialize(config.LoggingConfig);

            DatabaseInitializer.Initialize(config.DataConfig);

            if (MvcIocInitializer != null)
            {
                MvcIocInitializer.Initialize(config);
            }
            if (WebApiIocInitializer != null)
            {
                WebApiIocInitializer.Initialize(config);
            }
            if (SignalRIocInitializer != null)
            {
                SignalRIocInitializer.Initialize(config);
            }
            //DataLoggingInitializer.Initialize(config.LoggingConfig.DataLoggingConfig);
            DataHandlerInitializer.Initialize();
        }
 /// <summary>
 /// 初始化一个<see cref="FrameworkInitializer"/>类型的新实例
 /// </summary>
 public FrameworkInitializer()
 {
     BasicLoggingInitializer = new BasicLoggingInitializer();
     DatabaseInitializer = new DatabaseInitializer();
     DataLoggingInitializer = new DataLoggingInitializer();
     DataHandlerInitializer = new DataHandlerInitializer();
 }
Exemple #3
0
 /// <summary>
 /// 初始化一个<see cref="FrameworkInitializer"/>类型的新实例
 /// </summary>
 public FrameworkInitializer()
 {
     BasicLoggingInitializer = new BasicLoggingInitializer();
     DatabaseInitializer     = new DatabaseInitializer();
     DataLoggingInitializer  = new DataLoggingInitializer();
     DataHandlerInitializer  = new DataHandlerInitializer();
 }