From cd5627c8247294032cd7a26ed50e5d065eae96ce Mon Sep 17 00:00:00 2001 From: Amy Palamountain Date: Wed, 19 Feb 2014 22:00:56 +1300 Subject: [PATCH] Bam! --- Octokit/Models/Request/AuthorizationUpdate.cs | 13 +++++++++++++ Octokit/Models/Response/Authorization.cs | 11 +++++++++++ Octokit/Models/Response/Branch.cs | 15 +++++++++++---- Octokit/Models/Response/Release.cs | 11 +++++++++++ Octokit/Models/Response/Team.cs | 10 +++++++++- 5 files changed, 55 insertions(+), 5 deletions(-) diff --git a/Octokit/Models/Request/AuthorizationUpdate.cs b/Octokit/Models/Request/AuthorizationUpdate.cs index 6b14205a..d7486175 100644 --- a/Octokit/Models/Request/AuthorizationUpdate.cs +++ b/Octokit/Models/Request/AuthorizationUpdate.cs @@ -1,10 +1,14 @@ +using System; using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; namespace Octokit { /// /// Used to create a new authorization. /// + [DebuggerDisplay("{DebuggerDisplay,nq}")] public class AuthorizationUpdate { /// @@ -31,5 +35,14 @@ namespace Octokit // An optional URL to remind you what app the OAuth token is for. /// public string NoteUrl { get; set; } + + internal string DebuggerDisplay + { + get + { + var scopes = Scopes ?? new List(); + return String.Format(CultureInfo.InvariantCulture, "Scopes: {0} ", string.Join(",", scopes)); + } + } } } \ No newline at end of file diff --git a/Octokit/Models/Response/Authorization.cs b/Octokit/Models/Response/Authorization.cs index 304dbb3b..ba0ffc5e 100644 --- a/Octokit/Models/Response/Authorization.cs +++ b/Octokit/Models/Response/Authorization.cs @@ -1,11 +1,14 @@ using System; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Globalization; namespace Octokit { /// /// Represents an oauth access given to a particular application. /// + [DebuggerDisplay("{DebuggerDisplay,nq}")] public class Authorization { /// @@ -58,5 +61,13 @@ namespace Octokit { get { return string.Join(",", Scopes); } } + + internal string DebuggerDisplay + { + get + { + return String.Format(CultureInfo.InvariantCulture, "Id: {0} CreatedAt: {1} ", Id, CreatedAt); + } + } } } \ No newline at end of file diff --git a/Octokit/Models/Response/Branch.cs b/Octokit/Models/Response/Branch.cs index 267a4bd4..1915a2ea 100644 --- a/Octokit/Models/Response/Branch.cs +++ b/Octokit/Models/Response/Branch.cs @@ -1,11 +1,10 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Diagnostics; +using System.Globalization; namespace Octokit { + [DebuggerDisplay("{DebuggerDisplay,nq}")] public class Branch { /// @@ -17,5 +16,13 @@ namespace Octokit /// The history for this . /// public GitReference Commit { get; set; } + + internal string DebuggerDisplay + { + get + { + return String.Format(CultureInfo.InvariantCulture, "Name: {0}", Name); + } + } } } diff --git a/Octokit/Models/Response/Release.cs b/Octokit/Models/Response/Release.cs index 32bbf5fb..0d553cc9 100644 --- a/Octokit/Models/Response/Release.cs +++ b/Octokit/Models/Response/Release.cs @@ -1,8 +1,11 @@ using System; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; +using System.Globalization; namespace Octokit { + [DebuggerDisplay("{DebuggerDisplay,nq}")] public class Release { public string Url { get; set; } @@ -19,5 +22,13 @@ namespace Octokit public bool Prerelease { get; set; } public DateTimeOffset CreatedAt { get; set; } public DateTimeOffset? PublishedAt { get; set; } + + internal string DebuggerDisplay + { + get + { + return String.Format(CultureInfo.InvariantCulture, "Name: {0} PublishedAt: {1}", Name, PublishedAt); + } + } } } \ No newline at end of file diff --git a/Octokit/Models/Response/Team.cs b/Octokit/Models/Response/Team.cs index 9d8ce0ef..e1171065 100644 --- a/Octokit/Models/Response/Team.cs +++ b/Octokit/Models/Response/Team.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using System.Diagnostics; using System.Globalization; @@ -8,6 +7,7 @@ namespace Octokit /// /// organization teams /// + [DebuggerDisplay("{DebuggerDisplay,nq}")] public class Team { /// @@ -44,5 +44,13 @@ namespace Octokit /// who this team belongs to /// public Organization Organization { get; set; } + + internal string DebuggerDisplay + { + get + { + return String.Format(CultureInfo.InvariantCulture, "Name: {0} ", Name); + } + } } } \ No newline at end of file