Files
octokit.net/Octokit/Models/Response/ActivityPayloads/ActivityPayload.cs
tasadar2 3345f76fc9 Adding a convention test to detect whether a model has a constructor exposing all properties (#1798)
* 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
2018-04-25 21:03:13 +10:00

28 lines
694 B
C#

using System.Diagnostics;
namespace Octokit
{
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class ActivityPayload
{
public ActivityPayload() { }
public ActivityPayload(Repository repository, User sender, InstallationId installation)
{
Repository = repository;
Sender = sender;
Installation = installation;
}
public Repository Repository { get; protected set; }
public User Sender { get; protected set; }
public InstallationId Installation { get; protected set; }
internal string DebuggerDisplay
{
get { return Repository.FullName; }
}
}
}