using System.Diagnostics; using System.Globalization; namespace Octokit { /// /// Used to create a pull request review comment. /// [DebuggerDisplay("{DebuggerDisplay,nq}")] public class PullRequestReviewCommentCreate : RequestParameters { /// /// Creates a comment /// /// The text of the comment /// The SHA of the commit to comment on /// The relative path of the file to comment on /// The line index in the diff to comment on public PullRequestReviewCommentCreate(string body, string commitId, string path, int position) { Ensure.ArgumentNotNullOrEmptyString(body, nameof(body)); Ensure.ArgumentNotNullOrEmptyString(commitId, nameof(commitId)); Ensure.ArgumentNotNullOrEmptyString(path, nameof(path)); Body = body; CommitId = commitId; Path = path; Position = position; } /// /// The text of the comment. /// public string Body { get; private set; } /// /// The SHA of the commit to comment on. /// public string CommitId { get; private set; } /// /// The relative path of the file to comment on. /// public string Path { get; private set; } /// /// The line index in the diff to comment on. /// public int Position { get; private set; } internal string DebuggerDisplay { get { return string.Format(CultureInfo.InvariantCulture, "CommitId: {0}, Path: {1}, Position: {2}", CommitId, Path, Position); } } } }