using System; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; using Octokit.Helpers; namespace Octokit { [DebuggerDisplay("{DebuggerDisplay,nq}")] public class WeeklyHash { public WeeklyHash() { } [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "w")] [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "a")] [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "d")] [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "c")] public WeeklyHash(long w, int a, int d, int c) { W = w; A = a; D = d; C = c; } [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "W")] public long W { get; protected set; } [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "A")] public int A { get; protected set; } [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "D")] public int D { get; protected set; } [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "C")] public int C { get; protected set; } public DateTimeOffset Week { get { return W.FromUnixTime(); } } public int Additions { get { return A; } } public int Deletions { get { return D; } } public int Commits { get { return C; } } internal string DebuggerDisplay { get { return string.Format(CultureInfo.InvariantCulture, "Week: {0} Commits: {1}", Week, Commits); } } } }