private bool bClearRegisterRoute = false; //是否已经清除,已清除,则禁止重启定时器,否则继续 void Application_Start(object sender, EventArgs e) { RegisterRoutes(); IBatisNetManager.Init();//数据初始化 GlobalManager.Init(GlobalManager.SmartLife_CertManage_ManageServices); GlobalManager.ReadParams(); //GlobalManager.ReadRegInfo();//读取注册信息 Assembly assem = Assembly.GetExecutingAssembly(); StreamReader srForErrorMessage = new StreamReader(assem.GetManifestResourceStream("SmartLife.CertManage.ManageServices.ErrorCode.txt")); string[] lines = srForErrorMessage.ReadToEnd().Split('\n'); srForErrorMessage.Close(); foreach (var line in lines) { if (line.Trim() != "") { var keyValues = line.Split("=".ToCharArray()); if (!GlobalManager.errorCodeMessages.ContainsKey(keyValues[0])) { GlobalManager.errorCodeMessages.Add(keyValues[0], keyValues[1].Replace("\r", "")); } } } //初始化引用访问性 GlobalManager.ApplicationAccessible.AddRange(BuilderFactory.DefaultBulder().List <ApplicationAccessibility>(new ApplicationAccessibility { InterfaceApplicationId = GlobalManager.SmartLife_CertManage_ManageServices }).Select(item => item.AccessApplicationId).ToList()); GlobalManager.DeployNodes.AddRange(BuilderFactory.DefaultBulder().List <DeployNode>(new DeployNode { ApplicationIdTo = GlobalManager.SmartLife_CertManage_ManageServices })); CacheManager.Init(); GlobalManager.CurrentIPCC_CallCenterId = BuilderFactory.DefaultBulder().List <SmartLife.Share.Models.Oca.CallCenter>().First().StationId; //注册数据连接 var itemsOfProvider = BuilderFactory.DefaultBulder().List <DictionaryItem>(new DictionaryItem { DictionaryId = "00015" }); IList <DatabaseConnect> databaseConnects = BuilderFactory.DefaultBulder().List <DatabaseConnect>(); IList <dynamic> connects = databaseConnects.Select(item => { dynamic connect = new ExpandoObject(); connect.ConnectId = item.ConnectId; connect.Provider = itemsOfProvider.Single(it => it.ItemId == item.Provider).ItemName; connect.ServerName = e0571.web.core.Service.ServiceManager.Instance.CryptoService.StringCrypto.Decrypt(item.ServerName); connect.UserCode = e0571.web.core.Service.ServiceManager.Instance.CryptoService.StringCrypto.Decrypt(item.UserCode); connect.UserPassword = e0571.web.core.Service.ServiceManager.Instance.CryptoService.StringCrypto.Decrypt(item.UserPassword); connect.DatabaseName = e0571.web.core.Service.ServiceManager.Instance.CryptoService.StringCrypto.Decrypt(item.DatabaseName); connect.IbatisConfigFileRefer = item.IbatisConfigFileRefer; connect.IbatisConfigFileValue = e0571.web.core.Service.ServiceManager.Instance.CryptoService.StringCrypto.Decrypt(item.IbatisConfigFileValue); return(connect); }).ToList(); IBatisNetManager.RegisterIBATIS(connects); //GlobalManager.Activiate(); //定时清除路由 ClearRegisterRoutes(); }
void Application_Start(object sender, EventArgs e) { RegisterRoutes(); IBatisNetManager.Init();//数据初始化 GlobalManager.Init(GlobalManager.SmartLife_WeiXin); Assembly assem = Assembly.GetExecutingAssembly(); StreamReader srForErrorMessage = new StreamReader(assem.GetManifestResourceStream("SmartLife.WeiXin.ErrorCode.txt")); string[] lines = srForErrorMessage.ReadToEnd().Split('\n'); srForErrorMessage.Close(); foreach (var line in lines) { if (line.Trim() != "") { var keyValues = line.Split("=".ToCharArray()); if (!GlobalManager.errorCodeMessages.ContainsKey(keyValues[0])) { GlobalManager.errorCodeMessages.Add(keyValues[0], keyValues[1].Replace("\r", "")); } } } TheServiceAccount = BuilderFactory.DefaultBulder().Load <ServiceAccount, ServiceAccountPK>(new ServiceAccountPK { AccountCode = "zj-leblue" }); }
void Application_Start(object sender, EventArgs e) { RegisterRoutes(); IBatisNetManager.Init();//数据初始化 CacheManager.Init(); GlobalManager.InitIndependent(); //AreaId = JsonConvert.DeserializeObject<AppDeployArea>(CacheManager.ParmeterCacheProvider.Get("Sys_AppDeployArea").ToString()).id; }
void Application_Start(object sender, EventArgs e) { RegisterRoutes(); IBatisNetManager.Init();//数据初始化 oldConnectString = IBatisNet.DataAccess.DaoManager.GetInstance().LocalDataSource.ConnectionString; GlobalManager.Init(gApplicationId); redirects.AddRange(BuilderFactory.DefaultBulder().List <Redirect>()); GlobalManager.ApplicationAccessible.AddRange(BuilderFactory.DefaultBulder().List <ApplicationAccessibility>(new ApplicationAccessibility { InterfaceApplicationId = gApplicationId }).Select(item => item.AccessApplicationId).ToList()); GlobalManager.DeployNodes.AddRange(BuilderFactory.DefaultBulder().List <DeployNode>()); CacheManager.Init(); }
void Application_Start(object sender, EventArgs e) { string accountCode = ""; StreamReader srForSettings = new StreamReader(HttpContext.Current.Server.MapPath("~/Settings.ini")); string[] lines0 = srForSettings.ReadToEnd().Split('\n'); srForSettings.Close(); foreach (var line in lines0) { if (line.Trim() != "") { var keyValues = line.Split("=".ToCharArray()); if (keyValues[0] == "AccountCode") { accountCode = keyValues[1].Replace("\r", ""); } } } RegisterRoutes(); IBatisNetManager.Init();//数据初始化 GlobalManager.InitIndependent(); CacheManager.Init(); Assembly assem = Assembly.GetExecutingAssembly(); StreamReader srForErrorMessage = new StreamReader(assem.GetManifestResourceStream(assem.GetName().Name + ".ErrorCode.txt")); string[] lines = srForErrorMessage.ReadToEnd().Split('\n'); srForErrorMessage.Close(); foreach (var line in lines) { if (line.Trim() != "") { var keyValues = line.Split("=".ToCharArray()); if (!GlobalManager.errorCodeMessages.ContainsKey(keyValues[0])) { GlobalManager.errorCodeMessages.Add(keyValues[0], keyValues[1].Replace("\r", "")); } } } Implements.IMP_V1 host = new Implements.IMP_V1(); GlobalManager.InitWeiXin(accountCode, host, host, host, host); }
void Application_Start(object sender, EventArgs e) { RegisterRoutes(); IBatisNetManager.Init();//数据初始化 GlobalManager.Init(GlobalManager.SmartLife_Auth_Mobile_Services); Assembly assem = Assembly.GetExecutingAssembly(); StreamReader srForErrorMessage = new StreamReader(assem.GetManifestResourceStream("SmartLife.Auth.Mobile.Services.ErrorCode.txt")); string[] lines = srForErrorMessage.ReadToEnd().Split('\n'); srForErrorMessage.Close(); foreach (var line in lines) { if (line.Trim() != "") { var keyValues = line.Split("=".ToCharArray()); if (!GlobalManager.errorCodeMessages.ContainsKey(keyValues[0])) { GlobalManager.errorCodeMessages.Add(keyValues[0], keyValues[1].Replace("\r", "")); } } } }
void Application_Start(object sender, EventArgs e) { RegisterRoutes(); IBatisNetManager.Init();//数据初始化 GlobalManager.Init(GlobalManager.SmartLife_Auth_ManageServices); GlobalManager.ReadParams(); Assembly assem = Assembly.GetExecutingAssembly(); StreamReader srForErrorMessage = new StreamReader(assem.GetManifestResourceStream("SmartLife.City.ManageServices.ErrorCode.txt")); string[] lines = srForErrorMessage.ReadToEnd().Split('\n'); srForErrorMessage.Close(); foreach (var line in lines) { if (line.Trim() != "") { var keyValues = line.Split("=".ToCharArray()); if (!GlobalManager.errorCodeMessages.ContainsKey(keyValues[0])) { GlobalManager.errorCodeMessages.Add(keyValues[0], keyValues[1].Replace("\r", "")); } } } //初始化引用访问性 GlobalManager.ApplicationAccessible.AddRange(BuilderFactory.DefaultBulder().List <ApplicationAccessibility>(new ApplicationAccessibility { InterfaceApplicationId = GlobalManager.SmartLife_City_ManageServices }).Select(item => item.AccessApplicationId).ToList()); GlobalManager.DeployNodes.AddRange(BuilderFactory.DefaultBulder().List <DeployNode>(new DeployNode { ApplicationIdTo = GlobalManager.SmartLife_City_ManageServices })); CacheManager.Init(); //注册数据连接ase GlobalManager.RegisterDatabaseConnections(); }
void Application_Start(object sender, EventArgs e) { StreamReader srForSettings = new StreamReader(HttpContext.Current.Server.MapPath("~/bin/Settings.txt")); string[] lines0 = srForSettings.ReadToEnd().Split('\n'); srForSettings.Close(); foreach (var line in lines0) { if (line.Trim() != "") { var keyValues = line.Split("=".ToCharArray()); if (!GlobalManager.settingsForPhysicalDeploy.ContainsKey(keyValues[0])) { GlobalManager.settingsForPhysicalDeploy.Add(keyValues[0], keyValues[1].Replace("\r", "")); } } } RegisterRoutes(); IBatisNetManager.Init();//数据初始化 oldConnectString = IBatisNet.DataAccess.DaoManager.GetInstance().LocalDataSource.ConnectionString; GlobalManager.Init(GlobalManager.SmartLife_Auth_CertServices); Assembly assem = Assembly.GetExecutingAssembly(); StreamReader srForErrorMessage = new StreamReader(assem.GetManifestResourceStream("SmartLife.Auth.CertServices.ErrorCode.txt")); string[] lines = srForErrorMessage.ReadToEnd().Split('\n'); srForErrorMessage.Close(); foreach (var line in lines) { if (line.Trim() != "") { var keyValues = line.Split("=".ToCharArray()); if (!GlobalManager.errorCodeMessages.ContainsKey(keyValues[0])) { GlobalManager.errorCodeMessages.Add(keyValues[0], keyValues[1].Replace("\r", "")); } } } redirects.AddRange(BuilderFactory.DefaultBulder().List <Redirect>()); GlobalManager.DeployNodes.AddRange(BuilderFactory.DefaultBulder().List <DeployNode>()); CacheManager.Init(); //注册数据连接 var itemsOfProvider = BuilderFactory.DefaultBulder().List <DictionaryItem>(new DictionaryItem { DictionaryId = "00015" }); IList <DatabaseConnect> databaseConnects = BuilderFactory.DefaultBulder().List <DatabaseConnect>(); IList <dynamic> connects = databaseConnects.Select(item => { dynamic connect = new ExpandoObject(); connect.ConnectId = item.ConnectId; connect.Provider = itemsOfProvider.Single(it => it.ItemId == item.Provider).ItemName; connect.ServerName = e0571.web.core.Service.ServiceManager.Instance.CryptoService.StringCrypto.Decrypt(item.ServerName); connect.UserCode = e0571.web.core.Service.ServiceManager.Instance.CryptoService.StringCrypto.Decrypt(item.UserCode); connect.UserPassword = e0571.web.core.Service.ServiceManager.Instance.CryptoService.StringCrypto.Decrypt(item.UserPassword); connect.DatabaseName = e0571.web.core.Service.ServiceManager.Instance.CryptoService.StringCrypto.Decrypt(item.DatabaseName); connect.IbatisConfigFileRefer = item.IbatisConfigFileRefer; connect.IbatisConfigFileValue = e0571.web.core.Service.ServiceManager.Instance.CryptoService.StringCrypto.Decrypt(item.IbatisConfigFileValue); return(connect); }).ToList(); IBatisNetManager.RegisterIBATIS(connects); }
void Application_Start(object sender, EventArgs e) { RegisterRoutes(); IBatisNetManager.Init();//数据初始化 }
public static void RegisterDatabaseConnection(IList <dynamic> connections) { IBatisNetManager.RegisterIBATIS(connections); }