using System; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; namespace Octokit { /// /// The affected files in a . /// [DebuggerDisplay("{DebuggerDisplay,nq}")] public class GitHubCommitFile { public GitHubCommitFile() { } [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly")] public GitHubCommitFile(string filename, int additions, int deletions, int changes, string status, string blobUrl, string contentsUrl, string rawUrl, string sha, string patch, string previousFileName) { Filename = filename; Additions = additions; Deletions = deletions; Changes = changes; Status = status; BlobUrl = blobUrl; ContentsUrl = contentsUrl; RawUrl = rawUrl; Sha = sha; Patch = patch; PreviousFileName = previousFileName; } /// /// The name of the file /// [SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly")] public string Filename { get; protected set; } /// /// Number of additions performed on the file. /// public int Additions { get; protected set; } /// /// Number of deletions performed on the file. /// public int Deletions { get; protected set; } /// /// Number of changes performed on the file. /// public int Changes { get; protected set; } /// /// File status, like modified, added, deleted. /// public string Status { get; protected set; } /// /// The url to the file blob. /// public string BlobUrl { get; protected set; } /// /// The url to file contents API. /// public string ContentsUrl { get; protected set; } /// /// The raw url to download the file. /// public string RawUrl { get; protected set; } /// /// The SHA of the file. /// public string Sha { get; protected set; } /// /// The patch associated with the commit /// public string Patch { get; protected set; } /// /// The previous filename for a renamed file. /// public string PreviousFileName { get; protected set; } internal string DebuggerDisplay { get { return String.Format(CultureInfo.InvariantCulture, "Filename: {0} ({1})", Filename, Status); } } } }