/// <summary> /// Create a new SelfPost instance populated with its Subreddit, an ID/Fullname returned by the API, and other specified values. /// </summary> /// <param name="dispatch">An instance of the Dispatch controller</param> /// <param name="postResultShortData">Data returned by the Reddit API when creating a new post</param> /// <param name="selfPost">The SelfPost instance that executed the submission</param> public SelfPost(Dispatch dispatch, PostResultShortData postResultShortData, SelfPost selfPost) : base(dispatch, selfPost.Subreddit, selfPost.Title, selfPost.Author, postResultShortData.Id, postResultShortData.Name, selfPost.Permalink, selfPost.Created, selfPost.Edited, selfPost.Score, selfPost.UpVotes, selfPost.DownVotes, selfPost.Removed, selfPost.Spam, selfPost.NSFW) { SelfText = selfPost.SelfText; SelfTextHTML = selfPost.SelfTextHTML; Listing = new Things.Post(this); }
/// <summary> /// Create a new link post controller instance, populated from post result data. /// </summary> /// <param name="dispatch"></param> /// <param name="postResultShortData"></param> /// <param name="linkPost"></param> public LinkPost(Dispatch dispatch, PostResultShortData postResultShortData, LinkPost linkPost) : base(dispatch, linkPost.Subreddit, linkPost.Title, linkPost.Author, postResultShortData.Id, postResultShortData.Name, linkPost.Permalink, linkPost.Created, linkPost.Edited, linkPost.Score, linkPost.UpVotes, linkPost.DownVotes, linkPost.Removed, linkPost.Spam, linkPost.NSFW) { Preview = linkPost.Preview; URL = linkPost.URL; Thumbnail = linkPost.Thumbnail; ThumbnailHeight = linkPost.ThumbnailHeight; ThumbnailWidth = linkPost.ThumbnailWidth; Listing = new Things.Post(this); }