mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-08 20:45:51 +00:00
Debugger displays
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using Octokit.Helpers;
|
||||
|
||||
namespace Octokit
|
||||
{
|
||||
[DebuggerDisplay("{DebuggerDisplay,nq}")]
|
||||
public class WeeklyCommitActivity
|
||||
{
|
||||
/// <summary>
|
||||
@@ -21,6 +25,11 @@ namespace Octokit
|
||||
/// </summary>
|
||||
public long Week { get; set; }
|
||||
|
||||
public DateTimeOffset WeekTimestamp
|
||||
{
|
||||
get { return Week.FromUnixTime(); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the number of commits made on any <see cref="DayOfWeek"/>
|
||||
/// </summary>
|
||||
@@ -30,5 +39,14 @@ namespace Octokit
|
||||
{
|
||||
return Days.ElementAt((int)dayOfWeek);
|
||||
}
|
||||
|
||||
internal string DebuggerDisplay
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture,
|
||||
"Week: {0} Total Commits: {1}", WeekTimestamp, Total);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user