-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Copy pathCommitActivity.cs
35 lines (30 loc) · 974 Bytes
/
CommitActivity.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
namespace Octokit
{
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class CommitActivity
{
public CommitActivity() { }
public CommitActivity(IEnumerable<WeeklyCommitActivity> activity)
{
Ensure.ArgumentNotNull(activity, nameof(activity));
Activity = new ReadOnlyCollection<WeeklyCommitActivity>(activity.ToList());
}
/// <summary>
/// Returns the last year of commit activity grouped by week.
/// </summary>
public IReadOnlyList<WeeklyCommitActivity> Activity { get; private set; }
internal string DebuggerDisplay
{
get
{
return string.Format(CultureInfo.InvariantCulture,
"Weeks of activity: {0}", Activity.Count);
}
}
}
}