mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-01 10:25:36 +00:00
Debugger display ++
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using Octokit.Internal;
|
||||
|
||||
namespace Octokit
|
||||
{
|
||||
[DebuggerDisplay("{DebuggerDisplay,nq}")]
|
||||
public class IssueRequest : RequestParameters
|
||||
{
|
||||
public IssueRequest()
|
||||
@@ -23,6 +26,14 @@ namespace Octokit
|
||||
[Parameter(Key = "direction")]
|
||||
public SortDirection SortDirection { get; set; }
|
||||
public DateTimeOffset? Since { get; set; }
|
||||
|
||||
internal string DebuggerDisplay
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Filter: {0} State: {1}", Filter, State);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Octokit
|
||||
{
|
||||
/// <summary>
|
||||
/// Used to create a new authorization.
|
||||
/// </summary>
|
||||
[DebuggerDisplay("{DebuggerDisplay,nq}")]
|
||||
public class NewAuthorization
|
||||
{
|
||||
/// <summary>
|
||||
@@ -21,5 +25,13 @@ namespace Octokit
|
||||
/// An optional URL to remind you what app the OAuth token is for.
|
||||
/// </summary>
|
||||
public string NoteUrl { get; set; }
|
||||
|
||||
internal string DebuggerDisplay
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Note: {0}", Note);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Octokit
|
||||
{
|
||||
/// <summary>
|
||||
/// Describes a new repository to create via the <see cref="IRepositoriesClient.Create(NewRepository)"/> method.
|
||||
/// </summary>
|
||||
[DebuggerDisplay("{DebuggerDisplay,nq}")]
|
||||
public class NewRepository
|
||||
{
|
||||
/// <summary>
|
||||
@@ -57,5 +61,13 @@ namespace Octokit
|
||||
/// Optional. Gets or sets the ID of the team to grant access to this repository. This is only valid when creating a repository for an organization.
|
||||
/// </summary>
|
||||
public int? TeamId { get; set; }
|
||||
|
||||
internal string DebuggerDisplay
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Name: {0} Description: {1}", Name, Description);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Octokit
|
||||
{
|
||||
[DebuggerDisplay("{DebuggerDisplay,nq}")]
|
||||
public class ReleaseUpdate
|
||||
{
|
||||
public ReleaseUpdate(string tagName)
|
||||
@@ -17,5 +21,13 @@ namespace Octokit
|
||||
public string Body { get; set; }
|
||||
public bool Draft { get; set; }
|
||||
public bool Prerelease { get; set; }
|
||||
|
||||
internal string DebuggerDisplay
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Name: {0} TagName: {1}", Name, TagName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
@@ -11,6 +12,7 @@ namespace Octokit
|
||||
/// Searching Code/Files
|
||||
/// http://developer.github.com/v3/search/#search-code
|
||||
/// </summary>
|
||||
[DebuggerDisplay("{DebuggerDisplay,nq}")]
|
||||
public class SearchCodeRequest : BaseSearchRequest
|
||||
{
|
||||
public SearchCodeRequest(string term) : base(term) { }
|
||||
@@ -157,6 +159,14 @@ namespace Octokit
|
||||
|
||||
return parameters;
|
||||
}
|
||||
|
||||
internal string DebuggerDisplay
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Term: {0} Sort: {1}", Term, Sort);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum CodeSearchSort
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
using Octokit.Internal;
|
||||
using System.Diagnostics;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Octokit
|
||||
{
|
||||
/// <summary>
|
||||
/// Searching Users
|
||||
/// </summary>
|
||||
[DebuggerDisplay("{DebuggerDisplay,nq}")]
|
||||
public class SearchUsersRequest : BaseSearchRequest
|
||||
{
|
||||
public SearchUsersRequest(string term) : base(term)
|
||||
@@ -125,6 +124,14 @@ namespace Octokit
|
||||
|
||||
return parameters;
|
||||
}
|
||||
|
||||
internal string DebuggerDisplay
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Term: {0} Sort: {1}", Term, Sort);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum AccountType
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Octokit
|
||||
{
|
||||
[DebuggerDisplay("{DebuggerDisplay,nq}")]
|
||||
public class SshKeyUpdate
|
||||
{
|
||||
/// <summary>
|
||||
@@ -11,5 +16,13 @@ namespace Octokit
|
||||
/// The title of the SSH key
|
||||
/// </summary>
|
||||
public string Title { get; set; }
|
||||
|
||||
internal string DebuggerDisplay
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Key: {0} Title: {1}", Key, Title);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Octokit
|
||||
{
|
||||
[DebuggerDisplay("{DebuggerDisplay,nq}")]
|
||||
public class EventInfo
|
||||
{
|
||||
/// <summary>
|
||||
@@ -33,6 +36,14 @@ namespace Octokit
|
||||
/// Date the event occurred for the issue/pull request.
|
||||
/// </summary>
|
||||
public DateTimeOffset CreatedAt { get; set; }
|
||||
|
||||
internal string DebuggerDisplay
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Id: {0} CreatedAt: {1}", Id, CreatedAt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum EventInfoState
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Octokit
|
||||
{
|
||||
[DebuggerDisplay("{DebuggerDisplay,nq}")]
|
||||
public class IssueComment
|
||||
{
|
||||
/// <summary>
|
||||
@@ -38,5 +41,13 @@ namespace Octokit
|
||||
/// The user that created the issue comment.
|
||||
/// </summary>
|
||||
public User User { get; set; }
|
||||
|
||||
internal string DebuggerDisplay
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Id: {0} CreatedAt: {1}", Id, CreatedAt);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
namespace Octokit
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Octokit
|
||||
{
|
||||
[DebuggerDisplay("{DebuggerDisplay,nq}")]
|
||||
public class Notification
|
||||
{
|
||||
public string Id { get; set; } // NB: API currently returns this as string which is Weird
|
||||
@@ -10,5 +15,13 @@
|
||||
public string UpdatedAt { get; set; }
|
||||
public string LastReadAt { get; set; }
|
||||
public string Url { get; set; }
|
||||
|
||||
internal string DebuggerDisplay
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Repository: {0} UpdatedAt: {1}", Repository, UpdatedAt);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Octokit
|
||||
{
|
||||
[DebuggerDisplay("{DebuggerDisplay,nq}")]
|
||||
public class Readme
|
||||
{
|
||||
readonly Lazy<Task<string>> htmlContent;
|
||||
@@ -36,5 +39,13 @@ namespace Octokit
|
||||
{
|
||||
return htmlContent.Value;
|
||||
}
|
||||
|
||||
internal string DebuggerDisplay
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Name: {0} ", Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,10 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Octokit
|
||||
{
|
||||
[DebuggerDisplay("{DebuggerDisplay,nq}")]
|
||||
public class SshKey
|
||||
{
|
||||
/// <summary>
|
||||
@@ -21,5 +26,13 @@ namespace Octokit
|
||||
/// The api URL for this organization.
|
||||
/// </summary>
|
||||
public string Url { get; set; }
|
||||
|
||||
internal string DebuggerDisplay
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Title: {0} ", Title);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user