Add DebuggerDisplay property to model classes

This commit is contained in:
Ryan Gribble
2015-12-13 22:07:48 +10:00
parent d7472d6699
commit ef8270614f
2 changed files with 30 additions and 2 deletions
+11 -1
View File
@@ -1,4 +1,6 @@
using System.Diagnostics;
using System;
using System.Diagnostics;
using System.Globalization;
namespace Octokit
{
@@ -18,5 +20,13 @@ namespace Octokit
{
Protection = new BranchProtection();
}
internal string DebuggerDisplay
{
get
{
return String.Format(CultureInfo.InvariantCulture, "Protection: {0}", Protection.DebuggerDisplay);
}
}
}
}
+19 -1
View File
@@ -1,5 +1,7 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
namespace Octokit
{
@@ -24,6 +26,14 @@ namespace Octokit
{
RequiredStatusChecks = new RequiredStatusChecks();
}
internal string DebuggerDisplay
{
get
{
return String.Format(CultureInfo.InvariantCulture, "Enabled: {0}", Enabled);
}
}
}
[DebuggerDisplay("{DebuggerDisplay,nq}")]
@@ -69,6 +79,14 @@ namespace Octokit
Contexts.Clear();
}
}
internal string DebuggerDisplay
{
get
{
return String.Format(CultureInfo.InvariantCulture, "EnforcementLevel: {0} Contexts: {1}", EnforcementLevel.ToString(), Contexts.Count);
}
}
}
/// <summary>