예제 #1
0
        //---------------------------------------------------------------------
        public override Task OnActivateAsync()
        {
            string host = ConfigurationManager.AppSettings["UCenterDomain"];

            CoUCenterSDK = new UCenterClient(host);

            return(base.OnActivateAsync());
        }
예제 #2
0
        //---------------------------------------------------------------------
        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);
        }
예제 #3
0
        //---------------------------------------------------------------------
        public override Task OnDeactivateAsync()
        {
            CoUCenterSDK = null;

            return(base.OnDeactivateAsync());
        }
예제 #4
0
 public UCenterE2ETestBase()
 {
     this.host    = "http://localhost:8888/";
     this.cClient = new UCenterClient(host);
     this.sClient = new SDK.AppServer.UCenterClient(host);
 }