예제 #1
0
        protected void Prepared()
        {
            //获取业务服务程序集
            Assembly businessdll = Assembly.Load("EarlySite.Business");
            //获取业务服务程序集
            Assembly cachedll = Assembly.Load("EarlySite.Cache");

            //注册业务服务程序集
            ServiceObjectContainer.Load(businessdll);
            ServiceObjectContainer.Load(cachedll);

            Thread work = Thread.CurrentThread;

            lock (work)
            {
                if (WorkThreadDictionary.Get(work) == null)
                {
                    WorkThreadDictionary.Create(Thread.CurrentThread);
                    //EarlySite.Cache.Session.Deployment();
                    EarlySite.Cache.Session.DeploymentForWeb();
                }
            }

            //加载Redis
            //RedisClientManager.ReadOnlyHosts = new string[] { "192.168.11.103:6379" };
            //RedisClientManager.ReadOnlyHosts = new string[] { "192.168.11.103:6379" };



            //EarlySite.Cache.Session.Current.Set("test", "1111");
        }
        protected void Prepared()
        {
            MysqlDBConnection.Current.Database  = "taxmanagement";
            MysqlDBConnection.Current.Server    = "localhost";
            MysqlDBConnection.Current.LoginUser = "******";
            MysqlDBConnection.Current.Password  = "******";

            //数据库部署
            MysqlDBConnection.Current.Deployment();

            //集线器加载
            HubContainer.Load(Assembly.Load("TaxManagementSystem.Business"));
            //服务加载
            ServiceObjectContainer.Load(Assembly.Load("TaxManagementSystem.Business"));
        }