public InstaDirectInboxThread Convert() { var thread = new InstaDirectInboxThread { Canonical = SourceObject.Canonical, HasNewer = SourceObject.HasNewer, HasOlder = SourceObject.HasOlder, IsSpam = SourceObject.IsSpam, Muted = SourceObject.Muted, Named = SourceObject.Named, Pending = SourceObject.Pending, VieweId = SourceObject.VieweId, LastActivity = DateTimeHelper.UnixTimestampMilisecondsToDateTime(SourceObject.LastActivity), ThreadId = SourceObject.ThreadId }; thread.OldestCursor = thread.OldestCursor; thread.ThreadType = SourceObject.ThreadType; thread.Title = SourceObject.Title; if (SourceObject.Inviter != null) { var userConverter = ConvertersFabric.GetUserShortConverter(SourceObject.Inviter); thread.Inviter = userConverter.Convert(); } if (SourceObject.Items != null && SourceObject.Items.Count > 0) { thread.Items = new List <InstaDirectInboxItem>(); foreach (var item in SourceObject.Items) { var converter = ConvertersFabric.GetDirectThreadItemConverter(item); thread.Items.Add(converter.Convert()); } } if (SourceObject.Users != null && SourceObject.Users.Count > 0) { thread.Users = new InstaUserShortList(); foreach (var user in SourceObject.Users) { var converter = ConvertersFabric.GetUserShortConverter(user); thread.Users.Add(converter.Convert()); } } return(thread); }