Beispiel #1
0
        public RunTime LoadJSON()
        {
            try
            {
                string _json     = string.Empty;
                string _filePath = Main.GCONST.CachePath + Login.user.user_id + "_RT.dat";

                StreamReader _sr = File.OpenText(_filePath);
                _json = _sr.ReadToEnd();
                _sr.Close();

                if (!GCONST.DEBUG)
                {
                    _json = StringUtility.Decompress(_json);
                }

                RunTime _rt = JsonConvert.DeserializeObject <RunTime>(_json);

                s_logger.Trace("LoadJSON: OK");

                return(_rt);
            }
            catch (Exception _e)
            {
                NLogUtility.Exception(s_logger, _e, "LoadJSON");

                return(null);
            }
        }
Beispiel #2
0
        private bool LoadRunTime()
        {
            RunTime _rt = RT.LoadJSON();

            if (_rt != null)
            {
                RT = _rt;
                return(true);
            }
            else
            {
                return(false);
            }
        }
        public RT_REST(RunTime rt)
        {
            m_rt = rt;

            m_service = new WService();
        }