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
@@ -35,10 +35,10 @@ namespace Octokit
NewAuthorization newAuthorization,
Func<TwoFactorRequiredException, IObservable<TwoFactorChallengeResult>> twoFactorChallengeHandler)
{
Ensure.ArgumentNotNull(authorizationsClient, "authorizationsClient");
Ensure.ArgumentNotNullOrEmptyString(clientId, "clientId");
Ensure.ArgumentNotNullOrEmptyString(clientSecret, "clientSecret");
Ensure.ArgumentNotNull(newAuthorization, "newAuthorization");
Ensure.ArgumentNotNull(authorizationsClient, nameof(authorizationsClient));
Ensure.ArgumentNotNullOrEmptyString(clientId, nameof(clientId));
Ensure.ArgumentNotNullOrEmptyString(clientSecret, nameof(clientSecret));
Ensure.ArgumentNotNull(newAuthorization, nameof(newAuthorization));
return authorizationsClient.GetOrCreateApplicationAuthentication(clientId, clientSecret, newAuthorization)
.Catch<ApplicationAuthorization, TwoFactorRequiredException>(exception => twoFactorChallengeHandler(exception)
@@ -106,10 +106,10 @@ namespace Octokit
string twoFactorAuthenticationCode,
bool retryInvalidTwoFactorCode)
{
Ensure.ArgumentNotNull(authorizationsClient, "authorizationsClient");
Ensure.ArgumentNotNullOrEmptyString(clientId, "clientId");
Ensure.ArgumentNotNullOrEmptyString(clientSecret, "clientSecret");
Ensure.ArgumentNotNull(newAuthorization, "newAuthorization");
Ensure.ArgumentNotNull(authorizationsClient, nameof(authorizationsClient));
Ensure.ArgumentNotNullOrEmptyString(clientId, nameof(clientId));
Ensure.ArgumentNotNullOrEmptyString(clientSecret, nameof(clientSecret));
Ensure.ArgumentNotNull(newAuthorization, nameof(newAuthorization));
// If retryInvalidTwoFactorCode is false, then we only show the TwoFactorDialog when we catch
// a TwoFactorRequiredException. If it's true, we show it for TwoFactorRequiredException and