mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-07 04:16:51 +00:00
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:
committed by
Ryan Gribble
parent
c223f5ae9a
commit
4e804f61a6
@@ -26,7 +26,7 @@ namespace Octokit
|
||||
/// <returns>Lists the verified public keys for a user.</returns>
|
||||
public Task<IReadOnlyList<PublicKey>> GetAll(string userName)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(userName, "userName");
|
||||
Ensure.ArgumentNotNullOrEmptyString(userName, nameof(userName));
|
||||
|
||||
return GetAll(userName, ApiOptions.None);
|
||||
}
|
||||
@@ -42,8 +42,8 @@ namespace Octokit
|
||||
/// <returns>Lists the verified public keys for a user.</returns>
|
||||
public Task<IReadOnlyList<PublicKey>> GetAll(string userName, ApiOptions options)
|
||||
{
|
||||
Ensure.ArgumentNotNullOrEmptyString(userName, "userName");
|
||||
Ensure.ArgumentNotNull(options, "options");
|
||||
Ensure.ArgumentNotNullOrEmptyString(userName, nameof(userName));
|
||||
Ensure.ArgumentNotNull(options, nameof(options));
|
||||
|
||||
return ApiConnection.GetAll<PublicKey>(ApiUrls.Keys(userName), options);
|
||||
}
|
||||
@@ -70,7 +70,7 @@ namespace Octokit
|
||||
/// <returns>Lists the current user's keys.</returns>
|
||||
public Task<IReadOnlyList<PublicKey>> GetAllForCurrent(ApiOptions options)
|
||||
{
|
||||
Ensure.ArgumentNotNull(options, "options");
|
||||
Ensure.ArgumentNotNull(options, nameof(options));
|
||||
|
||||
return ApiConnection.GetAll<PublicKey>(ApiUrls.Keys(), options);
|
||||
}
|
||||
@@ -98,7 +98,7 @@ namespace Octokit
|
||||
/// <returns></returns>
|
||||
public Task<PublicKey> Create(NewPublicKey newKey)
|
||||
{
|
||||
Ensure.ArgumentNotNull(newKey, "newKey");
|
||||
Ensure.ArgumentNotNull(newKey, nameof(newKey));
|
||||
|
||||
return ApiConnection.Post<PublicKey>(ApiUrls.Keys(), newKey);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user