Add interface and required entities for Commit Comments.

This commit is contained in:
Will Froese
2014-02-22 22:56:22 -05:00
parent 8628a8aa36
commit fb9d400cfb
4 changed files with 201 additions and 0 deletions
@@ -0,0 +1,43 @@
using System;
using System.Diagnostics;
using System.Globalization;
namespace Octokit
{
/// <summary>
/// Describes a new commit comment to create via the <see cref="IRepositoryCommentsClient.Create(string,string,string,NewCommitComment)"/> method.
/// </summary>
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class NewCommitComment
{
public NewCommitComment(string body)
{
Ensure.ArgumentNotNull(body, "body");
Body = body;
}
/// <summary>
/// The contents of the comment (required)
/// </summary>
public string Body { get; private set; }
/// <summary>
/// Relative path of the file to comment on
/// </summary>
public string Path { get; set; }
/// <summary>
/// Line index in the diff to comment on
/// </summary>
public int? Position { get; set; }
internal string DebuggerDisplay
{
get
{
return String.Format(CultureInfo.InvariantCulture, "Path: {0}, Body: {1}", Path, Body);
}
}
}
}