public Mylist.MylistResponse ConvertMylistResponse(GetMylist.Contract Serial, string MylistID) { return(new Mylist.MylistResponse() { ErrorMessage = (Serial.error == null) ? null : Serial.error.description, Mylist = ConvertMylist(Serial, MylistID), Status = ConvertStatus(Serial.status, Serial.error), }); }
private Mylist.Mylist ConvertMylist(GetMylist.Contract Serial, string MylistID) { if (Serial == null) { return(null); } var result = (ic == null) ? new Mylist.Mylist(MylistID) : ic.GetMylist(MylistID); result.Description = Serial.description; result.Title = Serial.name; result.IsBookmark = Serial.is_watching_this_mylist; result.MylistItem = ConvertMylistItem(Serial.list); result.User = (ic == null) ? new User.User(Serial.user_id) : ic.GetUser(Serial.user_id); result.User.Name = Serial.user_nickname; return(result); }