//--------------------------------------------------------------------- public override Task OnActivateAsync() { string host = ConfigurationManager.AppSettings["UCenterDomain"]; CoUCenterSDK = new UCenterClient(host); return(base.OnActivateAsync()); }
//--------------------------------------------------------------------- public IMContext() { Instance = this; ExeConfigurationFileMap file = new ExeConfigurationFileMap(); file.ExeConfigFilename = "GameCloud.IM.Grain.dll.config"; Configuration cfg = ConfigurationManager.OpenMappedExeConfiguration(file, ConfigurationUserLevel.None); UCenterDomain = cfg.AppSettings.Settings["UCenterDomain"].Value; UCenterAppId = cfg.AppSettings.Settings["UCenterAppId"].Value; UCenterAppSecret = cfg.AppSettings.Settings["UCenterAppSecret"].Value; UCenterSDK = new UCenterClient(UCenterDomain); var connect_string = cfg.AppSettings.Settings["MongoDBConnectString"].Value; var db_name = cfg.AppSettings.Settings["MongoDBName"].Value; Mongo = new DbClientMongo(db_name, connect_string); RedisConnectString = cfg.AppSettings.Settings["RedisConnectString"].Value; RedisName = cfg.AppSettings.Settings["RedisName"].Value; Redis = new DbClientRedis(RedisName, RedisConnectString); }
//--------------------------------------------------------------------- public override Task OnDeactivateAsync() { CoUCenterSDK = null; return(base.OnDeactivateAsync()); }
public UCenterE2ETestBase() { this.host = "http://localhost:8888/"; this.cClient = new UCenterClient(host); this.sClient = new SDK.AppServer.UCenterClient(host); }