internal static DotMode ToDotMode(JSONObject jsonObj)
        {
            var dotMode = new DotMode();

            dotMode.DotConnected = jsonObj["dotConnected"];
            var feedbackList = new List <DotModeObjectCollection>();
            var arr          = jsonObj["feedback"];

            foreach (var val in arr)
            {
                feedbackList.Add(DotModeObjectCollection.ToObject(val.Value.AsObject));
            }

            dotMode.Feedback = feedbackList.ToArray();
            return(dotMode);
        }
示例#2
0
        internal static DotMode ToDotMode(JsonObject jsonObj)
        {
            var dotMode = new DotMode();

            dotMode.DotConnected = jsonObj.GetNamedBoolean("dotConnected");
            var feedbackList = new List <DotModeObjectCollection>();
            var arr          = jsonObj.GetNamedArray("feedback", new JsonArray());

            foreach (var val in arr)
            {
                feedbackList.Add(DotModeObjectCollection.ToObject(val.GetObject()));
            }

            dotMode.Feedback = feedbackList.ToArray();
            return(dotMode);
        }