mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-01 02:18: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
49 lines
1.1 KiB
C#
49 lines
1.1 KiB
C#
using System.Diagnostics;
|
|
using System.Globalization;
|
|
using Octokit.Internal;
|
|
|
|
namespace Octokit
|
|
{
|
|
[DebuggerDisplay("{DebuggerDisplay,nq}")]
|
|
public class TeamMembershipDetails
|
|
{
|
|
public TeamMembershipDetails() { }
|
|
|
|
public TeamMembershipDetails(TeamRole role, MembershipState state)
|
|
{
|
|
Role = role;
|
|
State = state;
|
|
}
|
|
|
|
public StringEnum<TeamRole> Role { get; protected set; }
|
|
|
|
public StringEnum<MembershipState> State { get; protected set; }
|
|
|
|
internal string DebuggerDisplay
|
|
{
|
|
get
|
|
{
|
|
return string.Format(CultureInfo.InvariantCulture, "Role: {0} State: {1}", Role, State);
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Roles within a Team
|
|
/// </summary>
|
|
public enum TeamRole
|
|
{
|
|
/// <summary>
|
|
/// Regular Team Member
|
|
/// </summary>
|
|
[Parameter(Value = "member")]
|
|
Member,
|
|
|
|
/// <summary>
|
|
/// Team Maintainer
|
|
/// </summary>
|
|
[Parameter(Value = "maintainer")]
|
|
Maintainer
|
|
}
|
|
}
|