diff --git a/Octokit/Models/Request/MilestoneRequest.cs b/Octokit/Models/Request/MilestoneRequest.cs index 43a46807..22b877b4 100644 --- a/Octokit/Models/Request/MilestoneRequest.cs +++ b/Octokit/Models/Request/MilestoneRequest.cs @@ -1,7 +1,11 @@ -using Octokit.Internal; +using System; +using System.Diagnostics; +using System.Globalization; +using Octokit.Internal; namespace Octokit { + [DebuggerDisplay("{DebuggerDisplay,nq}")] public class MilestoneRequest : RequestParameters { public MilestoneRequest() @@ -18,6 +22,14 @@ namespace Octokit [Parameter(Key = "direction")] public SortDirection SortDirection { get; set; } + + internal string DebuggerDisplay + { + get + { + return String.Format(CultureInfo.InvariantCulture, "State {0} ", State); + } + } } public enum MilestoneSort diff --git a/Octokit/Models/Request/NewMilestone.cs b/Octokit/Models/Request/NewMilestone.cs index 06751750..63362323 100644 --- a/Octokit/Models/Request/NewMilestone.cs +++ b/Octokit/Models/Request/NewMilestone.cs @@ -1,10 +1,13 @@ using System; +using System.Diagnostics; +using System.Globalization; namespace Octokit { /// /// Describes a new milestone to create via the method. /// + [DebuggerDisplay("{DebuggerDisplay,nq}")] public class NewMilestone { public NewMilestone(string title) @@ -34,5 +37,13 @@ namespace Octokit /// An optional date when the milestone is due. /// public DateTimeOffset? DueOn { get; set; } + + internal string DebuggerDisplay + { + get + { + return String.Format(CultureInfo.InvariantCulture, "Title {0} State: {1}", Title, State); + } + } } } diff --git a/Octokit/Models/Request/NewTag.cs b/Octokit/Models/Request/NewTag.cs index a9e42cb4..ed5f2643 100644 --- a/Octokit/Models/Request/NewTag.cs +++ b/Octokit/Models/Request/NewTag.cs @@ -1,15 +1,25 @@ -using System.Runtime.Serialization; +using System; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; +using System.Globalization; namespace Octokit { + [DebuggerDisplay("{DebuggerDisplay,nq}")] public class NewTag { public string Tag { get; set; } public string Message { get; set; } public string Object { get; set; } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods", - Justification = "Property name as defined by web api")] + [SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods", Justification = "Property name as defined by web api")] public TaggedType Type { get; set; } - public Signature Tagger { get; set; } + public Signature Tagger { get; set; } + internal string DebuggerDisplay + { + get + { + return String.Format(CultureInfo.InvariantCulture, "Tag {0} Type: {1}", Tag, Type); + } + } } } \ No newline at end of file diff --git a/Octokit/Models/Request/ReleaseAssetUpdate.cs b/Octokit/Models/Request/ReleaseAssetUpdate.cs index adf663ca..12f32cae 100644 --- a/Octokit/Models/Request/ReleaseAssetUpdate.cs +++ b/Octokit/Models/Request/ReleaseAssetUpdate.cs @@ -1,10 +1,10 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; +using System.Diagnostics; +using System.Globalization; namespace Octokit { + [DebuggerDisplay("{DebuggerDisplay,nq}")] public class ReleaseAssetUpdate { public ReleaseAssetUpdate(string name) @@ -25,5 +25,13 @@ namespace Octokit /// Used in place of the filename. /// public string Label { get; set; } + + internal string DebuggerDisplay + { + get + { + return String.Format(CultureInfo.InvariantCulture, "Name {0} Label: {1}", Name, Label); + } + } } } diff --git a/Octokit/Models/Request/RepositoryIssueRequest.cs b/Octokit/Models/Request/RepositoryIssueRequest.cs index 02f99e82..9ee3cda2 100644 --- a/Octokit/Models/Request/RepositoryIssueRequest.cs +++ b/Octokit/Models/Request/RepositoryIssueRequest.cs @@ -1,5 +1,8 @@ -namespace Octokit +using System.Diagnostics; + +namespace Octokit { + [DebuggerDisplay("{DebuggerDisplay,nq}")] public class RepositoryIssueRequest : IssueRequest { /// diff --git a/Octokit/Models/Response/Emoji.cs b/Octokit/Models/Response/Emoji.cs index 6bbd3e79..fae29867 100644 --- a/Octokit/Models/Response/Emoji.cs +++ b/Octokit/Models/Response/Emoji.cs @@ -1,7 +1,10 @@ using System; +using System.Diagnostics; +using System.Globalization; namespace Octokit { + [DebuggerDisplay("{DebuggerDisplay,nq}")] public class Emoji { public Emoji(string name, Uri url) @@ -15,5 +18,13 @@ namespace Octokit public string Name { get; private set; } public Uri Url { get; private set; } + + internal string DebuggerDisplay + { + get + { + return String.Format(CultureInfo.InvariantCulture, "Name {0} ", Name); + } + } } } diff --git a/Octokit/Models/Response/Milestone.cs b/Octokit/Models/Response/Milestone.cs index 5416a62a..b387b8e5 100644 --- a/Octokit/Models/Response/Milestone.cs +++ b/Octokit/Models/Response/Milestone.cs @@ -1,7 +1,10 @@ using System; +using System.Diagnostics; +using System.Globalization; namespace Octokit { + [DebuggerDisplay("{DebuggerDisplay,nq}")] public class Milestone { /// @@ -53,5 +56,13 @@ namespace Octokit /// The date, if any, when this milestone is due. /// public DateTimeOffset? DueOn { get; set; } + + internal string DebuggerDisplay + { + get + { + return String.Format(CultureInfo.InvariantCulture, "Title {0} ", Title); + } + } } } \ No newline at end of file diff --git a/Octokit/Models/Response/ReleaseAssetUpload.cs b/Octokit/Models/Response/ReleaseAssetUpload.cs index 88181713..25edb32e 100644 --- a/Octokit/Models/Response/ReleaseAssetUpload.cs +++ b/Octokit/Models/Response/ReleaseAssetUpload.cs @@ -1,11 +1,23 @@ +using System; +using System.Diagnostics; +using System.Globalization; using System.IO; namespace Octokit { + [DebuggerDisplay("{DebuggerDisplay,nq}")] public class ReleaseAssetUpload { public string FileName { get; set; } public string ContentType { get; set; } public Stream RawData { get; set; } + + internal string DebuggerDisplay + { + get + { + return String.Format(CultureInfo.InvariantCulture, "FileName: {0} ", FileName); + } + } } } \ No newline at end of file