mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-05 23:06:10 +00:00
48 lines
1.3 KiB
C#
48 lines
1.3 KiB
C#
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
|
|
{
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="NewCommitComment"/> class.
|
|
/// </summary>
|
|
/// <param name="body">The body of the comment.</param>
|
|
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);
|
|
}
|
|
}
|
|
}
|
|
}
|