Exemplo n.º 1
0
        internal static DotModeObject ToObject(JSONObject jsonObject)
        {
            var obj = new DotModeObject();

            obj.Index     = (int)ParseUtil.GetInt(jsonObject, ("index"));
            obj.Intensity = ParseUtil.GetFloat(jsonObject, "intensity");

            return(obj);
        }
Exemplo n.º 2
0
        internal static DotModeObjectCollection ToObject(JSONObject val)
        {
            var obj = new DotModeObjectCollection();

            obj.StartTime = ParseUtil.GetInt(val, "startTime");
            obj.EndTime   = ParseUtil.GetInt(val, "endTime");

            obj.PlaybackType = EnumParser.ToPlaybackType(val.GetValueOrDefault("playbackType", "NONE"));
            var list = new List <DotModeObject>();

            foreach (var jsonValue in val["pointList"])
            {
                list.Add(DotModeObject.ToObject(jsonValue.Value.AsObject));
            }

            obj.PointList = list.ToArray();

            return(obj);
        }