-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Reaction.cs
57 lines (49 loc) · 1.25 KB
/
Reaction.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
using Octokit.Internal;
using System;
using System.Diagnostics;
using System.Globalization;
namespace Octokit
{
public enum ReactionType
{
[Parameter(Value = "+1")]
Plus1,
[Parameter(Value = "-1")]
Minus1,
Laugh,
Confused,
Heart,
Hooray
}
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class Reaction
{
public Reaction() { }
public Reaction(int id, User user, ReactionType content)
{
Id = id;
User = user;
Content = content;
}
/// <summary>
/// The Id for this reaction.
/// </summary>
public int Id { get; protected set; }
/// <summary>
/// Information about the user.
/// </summary>
public User User { get; protected set; }
/// <summary>
/// The reaction type for this commit comment.
/// </summary>
[Parameter(Key = "content")]
public ReactionType Content { get; protected set; }
internal string DebuggerDisplay
{
get
{
return string.Format(CultureInfo.InvariantCulture, "Id: {0}, Reaction: {1}", Id, Content);
}
}
}
}