Refactor search result classes

They are now readonly and implement a generic base class.
This commit is contained in:
Haacked
2015-01-02 17:09:11 -08:00
parent 50db611335
commit b6a215d456
17 changed files with 143 additions and 64 deletions
+3 -16
View File
@@ -1,23 +1,10 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Diagnostics;
using Octokit.Internal;
namespace Octokit
{
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class SearchCodeResult
public class SearchCodeResult : SearchResult<SearchCode>
{
public int TotalCount { get; set; }
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
public IReadOnlyList<SearchCode> Items { get; set; }
internal string DebuggerDisplay
{
get
{
return String.Format(CultureInfo.InvariantCulture, "TotalCount: {0}", TotalCount);
}
}
}
}