diff --git a/Octokit/Clients/AuthorizationsClient.cs b/Octokit/Clients/AuthorizationsClient.cs
index 1d3adfd6..eb80c64d 100644
--- a/Octokit/Clients/AuthorizationsClient.cs
+++ b/Octokit/Clients/AuthorizationsClient.cs
@@ -34,9 +34,9 @@ namespace Octokit
///
/// Thrown when a general API error occurs.
/// A list of s.
- public async Task> GetAll()
+ public Task> GetAll()
{
- return await ApiConnection.GetAll(ApiUrls.Authorizations());
+ return ApiConnection.GetAll(ApiUrls.Authorizations());
}
///
diff --git a/Octokit/Clients/IssuesClient.cs b/Octokit/Clients/IssuesClient.cs
index 0f732a40..a868431d 100644
--- a/Octokit/Clients/IssuesClient.cs
+++ b/Octokit/Clients/IssuesClient.cs
@@ -23,12 +23,12 @@ namespace Octokit
/// The name of the repository
/// The issue number
///
- public async Task Get(string owner, string name, int number)
+ public Task Get(string owner, string name, int number)
{
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(name, "name");
- return await ApiConnection.Get(ApiUrls.Issue(owner, name, number));
+ return ApiConnection.Get(ApiUrls.Issue(owner, name, number));
}
///
@@ -40,9 +40,9 @@ namespace Octokit
/// http://developer.github.com/v3/issues/#list-issues
///
///
- public async Task> GetAllForCurrent()
+ public Task> GetAllForCurrent()
{
- return await GetAllForCurrent(new IssueRequest());
+ return GetAllForCurrent(new IssueRequest());
}
///
@@ -54,11 +54,11 @@ namespace Octokit
///
/// Used to filter and sort the list of issues returned
///
- public async Task> GetAllForCurrent(IssueRequest request)
+ public Task> GetAllForCurrent(IssueRequest request)
{
Ensure.ArgumentNotNull(request, "request");
- return await ApiConnection.GetAll(ApiUrls.Issues(), request.ToParametersDictionary());
+ return ApiConnection.GetAll(ApiUrls.Issues(), request.ToParametersDictionary());
}
///
@@ -70,9 +70,9 @@ namespace Octokit
/// http://developer.github.com/v3/issues/#list-issues
///
///
- public async Task> GetAllForOwnedAndMemberRepositories()
+ public Task> GetAllForOwnedAndMemberRepositories()
{
- return await GetAllForOwnedAndMemberRepositories(new IssueRequest());
+ return GetAllForOwnedAndMemberRepositories(new IssueRequest());
}
///
@@ -83,11 +83,11 @@ namespace Octokit
///
/// Used to filter and sort the list of issues returned
///
- public async Task> GetAllForOwnedAndMemberRepositories(IssueRequest request)
+ public Task> GetAllForOwnedAndMemberRepositories(IssueRequest request)
{
Ensure.ArgumentNotNull(request, "request");
- return await ApiConnection.GetAll(ApiUrls.IssuesForOwnedAndMember(),
+ return ApiConnection.GetAll(ApiUrls.IssuesForOwnedAndMember(),
request.ToParametersDictionary());
}
@@ -99,9 +99,9 @@ namespace Octokit
///
/// The name of the organization
///
- public async Task> GetAllForOrganization(string organization)
+ public Task> GetAllForOrganization(string organization)
{
- return await GetAllForOrganization(organization, new IssueRequest());
+ return GetAllForOrganization(organization, new IssueRequest());
}
///
@@ -113,9 +113,12 @@ namespace Octokit
/// The name of the organization
/// Used to filter and sort the list of issues returned
///
- public async Task> GetAllForOrganization(string organization, IssueRequest request)
+ public Task> GetAllForOrganization(string organization, IssueRequest request)
{
- return await ApiConnection.GetAll(ApiUrls.Issues(organization), request.ToParametersDictionary());
+ Ensure.ArgumentNotNullOrEmptyString(organization, "organization");
+ Ensure.ArgumentNotNull(request, "request");
+
+ return ApiConnection.GetAll(ApiUrls.Issues(organization), request.ToParametersDictionary());
}
///
@@ -127,9 +130,9 @@ namespace Octokit
/// The owner of the repository
/// The name of the repository
///
- public async Task> GetForRepository(string owner, string name)
+ public Task> GetForRepository(string owner, string name)
{
- return await GetForRepository(owner, name, new RepositoryIssueRequest());
+ return GetForRepository(owner, name, new RepositoryIssueRequest());
}
///
@@ -142,14 +145,14 @@ namespace Octokit
/// The name of the repository
/// Used to filter and sort the list of issues returned
///
- public async Task> GetForRepository(string owner, string name,
+ public Task> GetForRepository(string owner, string name,
RepositoryIssueRequest request)
{
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(name, "name");
Ensure.ArgumentNotNull(request, "request");
- return await ApiConnection.GetAll(ApiUrls.Issues(owner, name), request.ToParametersDictionary());
+ return ApiConnection.GetAll(ApiUrls.Issues(owner, name), request.ToParametersDictionary());
}
///
@@ -161,13 +164,13 @@ namespace Octokit
/// The name of the repository
/// A instance describing the new issue to create
///
- public async Task Create(string owner, string name, NewIssue newIssue)
+ public Task Create(string owner, string name, NewIssue newIssue)
{
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(name, "name");
Ensure.ArgumentNotNull(newIssue, "newIssue");
- return await ApiConnection.Post(ApiUrls.Issues(owner, name), newIssue);
+ return ApiConnection.Post(ApiUrls.Issues(owner, name), newIssue);
}
///
@@ -181,13 +184,13 @@ namespace Octokit
/// An instance describing the changes to make to the issue
///
///
- public async Task Update(string owner, string name, int number, IssueUpdate issueUpdate)
+ public Task Update(string owner, string name, int number, IssueUpdate issueUpdate)
{
Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
Ensure.ArgumentNotNullOrEmptyString(name, "name");
Ensure.ArgumentNotNull(issueUpdate, "issueUpdate");
- return await ApiConnection.Patch(ApiUrls.Issue(owner, name, number), issueUpdate);
+ return ApiConnection.Patch(ApiUrls.Issue(owner, name, number), issueUpdate);
}
}
}
diff --git a/Octokit/Helpers/ApiExtensions.cs b/Octokit/Helpers/ApiExtensions.cs
index bea77fc8..4a6db085 100644
--- a/Octokit/Helpers/ApiExtensions.cs
+++ b/Octokit/Helpers/ApiExtensions.cs
@@ -40,12 +40,12 @@ namespace Octokit
return connection.GetHtml(uri, null);
}
- public static async Task> GetAsync(this IConnection connection, Uri uri)
+ public static Task> GetAsync(this IConnection connection, Uri uri)
{
Ensure.ArgumentNotNull(connection, "connection");
Ensure.ArgumentNotNull(uri, "uri");
- return await connection.GetAsync(uri, null, null);
+ return connection.GetAsync(uri, null, null);
}
}
}
diff --git a/Octokit/Http/ApiConnection.cs b/Octokit/Http/ApiConnection.cs
index d3b381dd..e0cfee4b 100644
--- a/Octokit/Http/ApiConnection.cs
+++ b/Octokit/Http/ApiConnection.cs
@@ -78,9 +78,9 @@ namespace Octokit
/// URI of the API resource to get.
/// of the The API resources in the list.
/// Thrown when an API error occurs.
- public async Task> GetAll(Uri uri)
+ public Task> GetAll(Uri uri)
{
- return await GetAll(uri, null, null);
+ return GetAll(uri, null, null);
}
///
@@ -91,9 +91,9 @@ namespace Octokit
/// Parameters to add to the API request.
/// of the The API resources in the list.
/// Thrown when an API error occurs.
- public async Task> GetAll(Uri uri, IDictionary parameters)
+ public Task> GetAll(Uri uri, IDictionary parameters)
{
- return await GetAll(uri, parameters, null);
+ return GetAll(uri, parameters, null);
}
///
@@ -105,11 +105,11 @@ namespace Octokit
/// Accept header to use for the API request.
/// of the The API resources in the list.
/// Thrown when an API error occurs.
- public async Task> GetAll(Uri uri, IDictionary parameters, string accepts)
+ public Task> GetAll(Uri uri, IDictionary parameters, string accepts)
{
Ensure.ArgumentNotNull(uri, "uri");
- return await _pagination.GetAllPages(async () => await GetPage(uri, parameters, accepts));
+ return _pagination.GetAllPages(async () => await GetPage(uri, parameters, accepts));
}
///
@@ -120,12 +120,12 @@ namespace Octokit
/// Object that describes the new API resource; this will be serialized and used as the request's body.
/// The created API resource.
/// Thrown when an API error occurs.
- public async Task Post(Uri uri, object data)
+ public Task Post(Uri uri, object data)
{
Ensure.ArgumentNotNull(uri, "uri");
Ensure.ArgumentNotNull(data, "data");
- return await Post(uri, data, null, null);
+ return Post(uri, data, null, null);
}
///
@@ -137,9 +137,9 @@ namespace Octokit
/// Accept header to use for the API request.
/// The created API resource.
/// Thrown when an API error occurs.
- public async Task Post(Uri uri, object data, string accepts)
+ public Task Post(Uri uri, object data, string accepts)
{
- return await Post(uri, data, accepts, null);
+ return Post(uri, data, accepts, null);
}
///
@@ -226,11 +226,11 @@ namespace Octokit
///
/// URI of the API resource to delete.
/// A for the request's execution.
- public async Task Delete(Uri uri)
+ public Task Delete(Uri uri)
{
Ensure.ArgumentNotNull(uri, "uri");
- await Connection.DeleteAsync(uri);
+ return Connection.DeleteAsync(uri);
}
async Task> GetPage(
diff --git a/Octokit/Http/Connection.cs b/Octokit/Http/Connection.cs
index db5e58fa..003dee9f 100644
--- a/Octokit/Http/Connection.cs
+++ b/Octokit/Http/Connection.cs
@@ -117,18 +117,18 @@ namespace Octokit
_jsonPipeline = new JsonHttpPipeline();
}
- public async Task> GetAsync(Uri uri, IDictionary parameters, string accepts)
+ public Task> GetAsync(Uri uri, IDictionary parameters, string accepts)
{
Ensure.ArgumentNotNull(uri, "uri");
- return await SendData(uri.ApplyParameters(parameters), HttpMethod.Get, null, accepts, null);
+ return SendData(uri.ApplyParameters(parameters), HttpMethod.Get, null, accepts, null);
}
- public async Task> GetHtml(Uri uri, IDictionary parameters)
+ public Task> GetHtml(Uri uri, IDictionary parameters)
{
Ensure.ArgumentNotNull(uri, "uri");
- return await GetHtml(new Request
+ return GetHtml(new Request
{
Method = HttpMethod.Get,
BaseAddress = BaseAddress,
@@ -136,30 +136,30 @@ namespace Octokit
});
}
- public async Task> PatchAsync(Uri uri, object body)
+ public Task> PatchAsync(Uri uri, object body)
{
Ensure.ArgumentNotNull(uri, "uri");
Ensure.ArgumentNotNull(body, "body");
- return await SendData(uri, HttpVerb.Patch, body, null, null);
+ return SendData(uri, HttpVerb.Patch, body, null, null);
}
- public async Task> PostAsync(Uri uri, object body, string accepts, string contentType)
+ public Task> PostAsync(Uri uri, object body, string accepts, string contentType)
{
Ensure.ArgumentNotNull(uri, "uri");
Ensure.ArgumentNotNull(body, "body");
- return await SendData(uri, HttpMethod.Post, body, accepts, contentType);
+ return SendData(uri, HttpMethod.Post, body, accepts, contentType);
}
- public async Task> PutAsync(Uri uri, object body)
+ public Task> PutAsync(Uri uri, object body)
{
- return await SendData(uri, HttpMethod.Put, body, null, null);
+ return SendData(uri, HttpMethod.Put, body, null, null);
}
- public async Task> PutAsync(Uri uri, object body, string twoFactorAuthenticationCode)
+ public Task> PutAsync(Uri uri, object body, string twoFactorAuthenticationCode)
{
- return await SendData(uri,
+ return SendData(uri,
HttpMethod.Put,
body,
null,
@@ -167,7 +167,7 @@ namespace Octokit
twoFactorAuthenticationCode);
}
- async Task> SendData(
+ Task> SendData(
Uri uri,
HttpMethod method,
object body,
@@ -202,14 +202,14 @@ namespace Octokit
request.ContentType = contentType ?? "application/x-www-form-urlencoded";
}
- return await Run(request);
+ return Run(request);
}
- public async Task DeleteAsync(Uri uri)
+ public Task DeleteAsync(Uri uri)
{
Ensure.ArgumentNotNull(uri, "uri");
- await Run