Remove empty ApiInfo constructor

This commit is contained in:
Haacked
2015-01-01 21:12:24 -08:00
parent 53a6516de2
commit fbfc3fcd2c
7 changed files with 21 additions and 29 deletions
+2 -7
View File
@@ -6,11 +6,6 @@ namespace Octokit.Internal
{
public class ApiResponse<T> : IApiResponse<T>
{
public ApiResponse()
{
Headers = new Dictionary<string, string>();
}
public ApiResponse(IResponse response) : this(response, GetBodyAsObject(response))
{
}
@@ -40,9 +35,9 @@ namespace Octokit.Internal
static T GetBodyAsObject(IResponse response)
{
if (response == null) return default(T);
var body = response.Body;
return body is T ? (T)body : default(T);
if (body is T) return (T)body;
return default(T);
}
}
}