internal GitPullRequestActivityContent(JObject data, Project project, ActivityAction action) : base(action) { Changes = (data.Value <JArray>("changes") ?? Enumerable.Empty <object>()).Cast <JObject>() .Select(x => new Change(x)) .ToArray(); Repository = new GitRepoSummary(data["repository"].ToObject <_GitRepoSummary>(), project); PullRequest = new PullRequestSummary(data.ToObject <_PullRequestSummary>(), Repository); var comment = data["comment"].ToObject <_CommentSummary>(); if (comment?.id != default) { Comment = new CommentSummary(comment, PullRequest); } }
internal CommentSummary(_CommentSummary data, PullRequestSummary pullRequest) : base(data.id) { Content = data.content; PullRequest = pullRequest; }