mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-03 03:01:31 +00:00
Debugger display + extra clean up
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System.Diagnostics;
|
||||
using Octokit.Internal;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -11,6 +12,7 @@ namespace Octokit
|
||||
/// Searching Repositories
|
||||
/// http://developer.github.com/v3/search/#search-repositories
|
||||
/// </summary>
|
||||
[DebuggerDisplay("{DebuggerDisplay,nq}")]
|
||||
public class SearchRepositoriesRequest
|
||||
{
|
||||
public SearchRepositoriesRequest(string term)
|
||||
@@ -171,8 +173,8 @@ namespace Octokit
|
||||
/// get the params in the correct format...
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.Int32.ToString")]
|
||||
public System.Collections.Generic.IDictionary<string, string> Parameters
|
||||
[SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.Int32.ToString")]
|
||||
public IDictionary<string, string> Parameters
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -184,6 +186,14 @@ namespace Octokit
|
||||
return d;
|
||||
}
|
||||
}
|
||||
|
||||
internal string DebuggerDisplay
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Term: {0} Sort: {1}", Term, Sort);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -209,7 +219,7 @@ namespace Octokit
|
||||
/// Matches repositories that are <param name="size">size</param> MB exactly
|
||||
/// </summary>
|
||||
/// <param name="size"></param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.Int32.ToString")]
|
||||
[SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.Int32.ToString")]
|
||||
public Range(int size)
|
||||
{
|
||||
query = size.ToString();
|
||||
@@ -218,18 +228,19 @@ namespace Octokit
|
||||
/// <summary>
|
||||
/// Matches repositories that are between <see cref="minSize"/> and <see cref="maxSize"/> KB
|
||||
/// </summary>
|
||||
/// <param name="size"></param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object[])"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object,System.Object)"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.Int32.ToString")]
|
||||
/// <param name="minSize"></param>
|
||||
/// <param name="maxSize"></param>
|
||||
[SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object[])"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object,System.Object)"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.Int32.ToString")]
|
||||
public Range(int minSize, int maxSize)
|
||||
{
|
||||
query = string.Format("{0}..{1}", minSize.ToString(), maxSize.ToString());
|
||||
query = string.Format("{0}..{1}", minSize, maxSize);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Matches repositories with regards to the size <see cref="size"/>
|
||||
/// We will use the <see cref="op"/> to see what operator will be applied to the size qualifier
|
||||
/// </summary>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object[])"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.Int32.ToString"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object)")]
|
||||
[SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object[])"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.Int32.ToString"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object)")]
|
||||
public Range(int size, SearchQualifierOperator op)
|
||||
{
|
||||
switch (op)
|
||||
@@ -301,8 +312,9 @@ namespace Octokit
|
||||
/// Matches repositories with regards to the date <see cref="date"/>
|
||||
/// We will use the <see cref="op"/> to see what operator will be applied to the date qualifier
|
||||
/// </summary>
|
||||
/// <param name="year"></param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object[])"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.DateTime.ToString(System.String)"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object)")]
|
||||
/// <param name="date">The date</param>
|
||||
/// <param name="op">And its search operator</param>
|
||||
[SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object[])"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.DateTime.ToString(System.String)"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object)")]
|
||||
public DateRange(DateTime date, SearchQualifierOperator op)
|
||||
{
|
||||
switch (op)
|
||||
|
||||
Reference in New Issue
Block a user