mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-05-29 17:32:44 +00:00
3345f76fc9
* Added a convention test to detect a model constructor exposing all properties * add ctors to classes where they are missing * rename ctor parameters that dont match properties * add missing parameters to existing ctors * add specific PunchCard ctor to allow mocking, and update test to resolve call ambiguity * Added base class properties to the convention test Added member exclusion attribute * Updated newly offending classes 2 excludes and 2 ctors * rename exclusion attribute to be a bit shorter
52 lines
1.5 KiB
C#
52 lines
1.5 KiB
C#
using System.Diagnostics;
|
|
using System.Globalization;
|
|
using Octokit.Internal;
|
|
|
|
namespace Octokit
|
|
{
|
|
[DebuggerDisplay("{DebuggerDisplay,nq}")]
|
|
public class ReactionSummary
|
|
{
|
|
public ReactionSummary() { }
|
|
|
|
public ReactionSummary(int totalCount, int plus1, int minus1, int laugh, int confused, int heart, int hooray, string url)
|
|
{
|
|
TotalCount = totalCount;
|
|
Plus1 = plus1;
|
|
Minus1 = minus1;
|
|
Laugh = laugh;
|
|
Confused = confused;
|
|
Heart = heart;
|
|
Hooray = hooray;
|
|
Url = url;
|
|
}
|
|
|
|
public int TotalCount { get; protected set; }
|
|
[Parameter(Key = "+1")]
|
|
public int Plus1 { get; protected set; }
|
|
[Parameter(Key = "-1")]
|
|
public int Minus1 { get; protected set; }
|
|
public int Laugh { get; protected set; }
|
|
public int Confused { get; protected set; }
|
|
public int Heart { get; protected set; }
|
|
public int Hooray { get; protected set; }
|
|
public string Url { get; protected set; }
|
|
|
|
internal string DebuggerDisplay
|
|
{
|
|
get
|
|
{
|
|
return string.Format(
|
|
CultureInfo.InvariantCulture,
|
|
"TotalCount: {0} +1: {1} -1: {2} Laugh: {3} Confused: {4} Heart: {5} Hooray: {6}",
|
|
TotalCount,
|
|
Plus1,
|
|
Minus1,
|
|
Laugh,
|
|
Confused,
|
|
Heart,
|
|
Hooray);
|
|
}
|
|
}
|
|
}
|
|
} |