Prefer using nameof(x) over literal "x" (#1781)

* updated XML docs and added some missing bits.

* prefer nameof(x) over literal "x"
This commit is contained in:
Itai Bar-Haim
2018-03-07 12:43:10 +02:00
committed by Ryan Gribble
parent c223f5ae9a
commit 4e804f61a6
218 changed files with 2707 additions and 2706 deletions
@@ -104,7 +104,7 @@ namespace Octokit
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
public Task<IReadOnlyList<RepositoryInvitation>> GetAllForCurrent(ApiOptions options)
{
Ensure.ArgumentNotNull(options, "options");
Ensure.ArgumentNotNull(options, nameof(options));
return ApiConnection.GetAll<RepositoryInvitation>(ApiUrls.UserInvitations(), null, AcceptHeaders.InvitationsApiPreview, options);
}
@@ -132,7 +132,7 @@ namespace Octokit
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
public Task<IReadOnlyList<RepositoryInvitation>> GetAllForRepository(long repositoryId, ApiOptions options)
{
Ensure.ArgumentNotNull(options, "options");
Ensure.ArgumentNotNull(options, nameof(options));
return ApiConnection.GetAll<RepositoryInvitation>(ApiUrls.RepositoryInvitations(repositoryId), null, AcceptHeaders.InvitationsApiPreview, options);
}
@@ -148,7 +148,7 @@ namespace Octokit
/// <exception cref="ApiException">Thrown when a general API error occurs.</exception>
public Task<RepositoryInvitation> Edit(long repositoryId, int invitationId, InvitationUpdate permissions)
{
Ensure.ArgumentNotNull(permissions, "permissions");
Ensure.ArgumentNotNull(permissions, nameof(permissions));
return ApiConnection.Patch<RepositoryInvitation>(ApiUrls.RepositoryInvitations(repositoryId, invitationId), permissions, AcceptHeaders.InvitationsApiPreview);
}