private TimeLapsedImageParameters TimeLapsedParameters(JToken token) { var timeLapsed = new TimeLapsedImageParameters { Name = token["n"].Value <string>(), Size = token["s"].Value <long>(), Group = token["g"].Value <int>(), Start = token["b"].Value <int>(), End = token["l"].Value <int>() }; return(timeLapsed); }
private TimeLapsedImage TimeLapse(IEnumerable <Node> nodes) { var timeLapse = new TimeLapsedImageParameters { Name = nodes.First().Name, Start = int.Parse(nodes.First().Name.Substring(4, 4)), End = int.Parse(nodes.Last().Name.Substring(4, 4)), Group = int.Parse(nodes.First().Name.Substring(1, 3)), Size = nodes.Sum(n => n.SizeAsBytes()) }; return(Media <TimeLapsedImageParameters> .Create <TimeLapsedImage>(timeLapse, this)); }
private TimeLapsedImage TimeLapse(IEnumerable<Node> nodes) { var timeLapse=new TimeLapsedImageParameters { Name=nodes.First().Name, Start=int.Parse(nodes.First().Name.Substring(4, 4)), End=int.Parse(nodes.Last().Name.Substring(4, 4)), Group=int.Parse(nodes.First().Name.Substring(1,3)), Size=nodes.Sum(n => n.SizeAsBytes()) }; return Media<TimeLapsedImageParameters>.Create<TimeLapsedImage>(timeLapse, this); }
private TimeLapsedImageParameters TimeLapsedParameters(JToken token) { var timeLapsed = new TimeLapsedImageParameters { Name = token["n"].Value<string>(), Size = token["s"].Value<long>(), Group = token["g"].Value<int>(), Start = token["b"].Value<int>(), End = token["l"].Value<int>() }; return timeLapsed; }