Skip to content

Commit

Permalink
Update DebuggerDisplay in RepositoryRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexP11223 committed Mar 8, 2016
1 parent f50ccf7 commit 7866f3c
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion Octokit/Models/Request/RepositoryRequest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
Expand Down Expand Up @@ -57,7 +58,19 @@ internal string DebuggerDisplay
{
get
{
return string.Format(CultureInfo.InvariantCulture, "Type: {0}, Sort: {1}, Direction: {2}", Type, Sort, Direction);
var propValues = new List<string>();
if (Type.HasValue)
propValues.Add(string.Format(CultureInfo.InvariantCulture, "Type: {0}", Type));
if (Sort.HasValue)
propValues.Add(string.Format(CultureInfo.InvariantCulture, "Sort: {0}", Sort));
if (Direction.HasValue)
propValues.Add(string.Format(CultureInfo.InvariantCulture, "Direction: {0}", Direction));
if (Visibility.HasValue)
propValues.Add(string.Format(CultureInfo.InvariantCulture, "Visibility: {0}", Visibility));
if (Affiliation.HasValue)
propValues.Add(string.Format(CultureInfo.InvariantCulture, "Affiliation: {0}", Affiliation));

return string.Join(", ", propValues);
}
}
}
Expand Down

0 comments on commit 7866f3c

Please sign in to comment.