Implement IssuesClient and interface

This required updating our serialization strategy so we handle enums
better.
This commit is contained in:
Haacked
2013-10-22 10:29:26 -07:00
parent 1cc3da9ce3
commit ad210cecc7
35 changed files with 1278 additions and 55 deletions

View File

@@ -0,0 +1,31 @@
using System.Collections.Generic;
using System.Diagnostics;
namespace Octokit
{
public class RepositoryIssueRequest : IssueRequest
{
/// <summary>
/// Identifies a filter for the milestone. Use "*" for issues with any milestone.
/// Use the milestone number for a specific milestone. Use the value "none" for issues with any milestones.
/// </summary>
public string Milestone { get; set; }
/// <summary>
/// Returns a dictionary of query string parameters that represent this request. Only values that
/// do not have default values are in the dictionary. If everything is default, this returns an
/// empty dictionary.
/// </summary>
/// <returns></returns>
public override IDictionary<string, string> ToParametersDictionary()
{
var dictionary = base.ToParametersDictionary();
Debug.Assert(dictionary != null, "Base implementation is wrong. Dictionary should never be null");
if (!Milestone.IsBlank())
{
dictionary.Add("milestone", Milestone);
}
return dictionary;
}
}
}