Exemple #1
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);
        }
Exemple #2
0
 //---------------------------------------------------------------------
 public IMStartup()
 {
     var c = new IMContext();
 }