private static ResponsePart ParseJsonPart(JToken token, RequestType type) { var part = new ResponsePart { Type = type, Frequency = (int)token.SelectToken("frequency"), Appears = (int)token.SelectToken("appears") }; var lastSeen = token.SelectToken("lastseen"); if (lastSeen != null) { if (DateTime.TryParse((string)lastSeen, out var dt)) { part.LastSeen = dt; } } return(part); }
internal void Add(ResponsePart part) { this._parts.Add(part); }