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

View File

@@ -90,7 +90,7 @@ namespace Octokit
/// <param name="connection">The underlying <seealso cref="IConnection"/> used to make requests</param>
public GitHubClient(IConnection connection)
{
Ensure.ArgumentNotNull(connection, "connection");
Ensure.ArgumentNotNull(connection, nameof(connection));
Connection = connection;
var apiConnection = new ApiConnection(connection);
@@ -148,7 +148,7 @@ namespace Octokit
// Note this is for convenience. We probably shouldn't allow this to be mutable.
set
{
Ensure.ArgumentNotNull(value, "value");
Ensure.ArgumentNotNull(value, nameof(value));
Connection.Credentials = value;
}
}
@@ -289,7 +289,7 @@ namespace Octokit
static Uri FixUpBaseUri(Uri uri)
{
Ensure.ArgumentNotNull(uri, "uri");
Ensure.ArgumentNotNull(uri, nameof(uri));
if (uri.Host.Equals("github.com") || uri.Host.Equals("api.github.com"))
{