コード例 #1
0
        public void Load()
        {
            Clear();

            _error = string.Empty;

            Core.RPCCommand rpc = new Core.RPCCommand(_jee, "cmd::all");

            bool result = rpc.Execute();

            if (result)
            {
                _innerJson = rpc.Response;

                JObject googleSearch = JObject.Parse(rpc.Response);

                IEnumerable <JToken> results = googleSearch["result"].Children();

                foreach (JToken res in results)
                {
                    Command searchResult = JsonConvert.DeserializeObject <Command>(res.ToString());

                    searchResult.BaseCollection = _entities.EqLogics;

                    Add(searchResult);
                }
            }
            else
            {
                _error = rpc.Error;
            }

            _loaded = result;
        }
コード例 #2
0
        public void Load()
        {
            this.Clear();

            _error = string.Empty;

            Core.RPCCommand rpc = new Core.RPCCommand(_jee, "scenario::all");

            bool result = rpc.Execute();

            if (result)
            {
                _innerJson = rpc.Response;

                JObject googleSearch = JObject.Parse(rpc.Response);

                IEnumerable <JToken> results = googleSearch["result"].Children();

                foreach (JToken res in results)
                {
                    Scenario searchResult = JsonConvert.DeserializeObject <Scenario>(res.ToString());
                    Add(searchResult);
                }
            }
            else
            {
                _error = rpc.Error;
            }

            _loaded = result;
        }
コード例 #3
0
        public bool Empty()
        {
            Core.RPCCommand rpc = new Core.RPCCommand(_jee, "message::removeAll");

            if (rpc.Execute())
            {
                JObject googleSearch = JObject.Parse(rpc.Response);

                IEnumerable <JToken> results = googleSearch["result"];

                return(results.ToString() == "ok");
            }
            else
            {
                return(false);
            }
        }