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); }
internal static DotModeObject ToObject(JsonObject jsonObject) { var obj = new DotModeObject(); obj.Index = (int)jsonObject.GetNamedNumber("index"); obj.Intensity = ParseUtil.GetFloat(jsonObject, "intensity"); return(obj); }
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); }
internal static DotModeObjectCollection ToObject(JsonObject val) { var obj = new DotModeObjectCollection(); obj.StartTime = (int)val.GetNamedNumber("startTime"); obj.EndTime = (int)val.GetNamedNumber("endTime"); obj.PlaybackType = EnumParser.ToPlaybackType(val.GetNamedString("playbackType", "NONE")); var list = new List <DotModeObject>(); foreach (var jsonValue in val.GetNamedArray("pointList", new JsonArray())) { list.Add(DotModeObject.ToObject(jsonValue.GetObject())); } obj.PointList = list.ToArray(); return(obj); }