Replaced public properties by readonly fields with a public getter and cleaned code

This commit is contained in:
Gabriel Weyer
2013-11-24 19:06:59 +11:00
parent ceb943c550
commit 921353dd4b
9 changed files with 146 additions and 151 deletions

View File

@@ -4,15 +4,30 @@ namespace Octokit
{
public class PullRequestReviewCommentReplyCreate : RequestParameters
{
private readonly string _body;
private readonly int _inReplyTo;
/// <summary>
/// The text of the comment.
/// </summary>
public string Body { get; set; }
public string Body { get { return _body; } }
/// <summary>
/// The comment Id to reply to.
/// </summary>
[Parameter(Key = "in_reply_to")]
public int InReplyTo { get; set; }
public int InReplyTo { get { return _inReplyTo; } }
/// <summary>
/// Creates a comment that is replying to another comment.
/// </summary>
/// <param name="body">The text of the comment</param>
/// <param name="inReplyTo">The comment Id to reply to</param>
public PullRequestReviewCommentReplyCreate(string body, int inReplyTo)
{
Ensure.ArgumentNotNullOrEmptyString(body, "body");
_body = body;
_inReplyTo = inReplyTo;
}
}
}