From 3ddca30acd44c62fba4325c3d90910a470c39af9 Mon Sep 17 00:00:00 2001 From: Haacked Date: Tue, 22 Apr 2014 15:18:31 -0700 Subject: [PATCH] Add comments and debugger display --- Octokit/Models/Response/OauthToken.cs | 28 ++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/Octokit/Models/Response/OauthToken.cs b/Octokit/Models/Response/OauthToken.cs index 6c2d46e54e..5a4c9244eb 100644 --- a/Octokit/Models/Response/OauthToken.cs +++ b/Octokit/Models/Response/OauthToken.cs @@ -1,11 +1,37 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; namespace Octokit { + [DebuggerDisplay("{DebuggerDisplay,nq}")] public class OauthToken { + /// + /// The type of OAuth token + /// public string TokenType { get; set; } + + /// + /// The secret OAuth access token. Use this to authenticate Octokit.net's client. + /// public string AccessToken { get; set; } + + /// + /// The list of scopes the token includes. + /// public IReadOnlyCollection Scope { get; set; } + + internal string DebuggerDisplay + { + get + { + return String.Format(CultureInfo.InvariantCulture, "TokenType: {0}, AccessToken: {1}, Scopes: {2}", + TokenType, + AccessToken, + Scope); + } + } } }