diff --git a/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseAdminStatsClient.cs b/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseAdminStatsClient.cs
index 1ae1f61682..0de02bff46 100644
--- a/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseAdminStatsClient.cs
+++ b/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseAdminStatsClient.cs
@@ -15,7 +15,7 @@ public class ObservableEnterpriseAdminStatsClient : IObservableEnterpriseAdminSt
public ObservableEnterpriseAdminStatsClient(IGitHubClient client)
{
- Ensure.ArgumentNotNull(client, "client");
+ Ensure.ArgumentNotNull(client, nameof(client));
_client = client.Enterprise.AdminStats;
}
diff --git a/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseClient.cs b/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseClient.cs
index a463212a72..25ba9c2263 100644
--- a/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseClient.cs
+++ b/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseClient.cs
@@ -10,7 +10,7 @@ public class ObservableEnterpriseClient : IObservableEnterpriseClient
{
public ObservableEnterpriseClient(IGitHubClient client)
{
- Ensure.ArgumentNotNull(client, "client");
+ Ensure.ArgumentNotNull(client, nameof(client));
AdminStats = new ObservableEnterpriseAdminStatsClient(client);
Ldap = new ObservableEnterpriseLdapClient(client);
diff --git a/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseLdapClient.cs b/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseLdapClient.cs
index d8ed988345..b6fb718455 100644
--- a/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseLdapClient.cs
+++ b/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseLdapClient.cs
@@ -17,7 +17,7 @@ public class ObservableEnterpriseLdapClient : IObservableEnterpriseLdapClient
public ObservableEnterpriseLdapClient(IGitHubClient client)
{
- Ensure.ArgumentNotNull(client, "client");
+ Ensure.ArgumentNotNull(client, nameof(client));
_client = client.Enterprise.Ldap;
}
diff --git a/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseLicenseClient.cs b/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseLicenseClient.cs
index 3fbe664448..d3ca1e8e1b 100644
--- a/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseLicenseClient.cs
+++ b/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseLicenseClient.cs
@@ -16,7 +16,7 @@ public class ObservableEnterpriseLicenseClient : IObservableEnterpriseLicenseCli
public ObservableEnterpriseLicenseClient(IGitHubClient client)
{
- Ensure.ArgumentNotNull(client, "client");
+ Ensure.ArgumentNotNull(client, nameof(client));
_client = client.Enterprise.License;
}
diff --git a/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseOrganizationClient.cs b/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseOrganizationClient.cs
index bf064920d6..6beaf279de 100644
--- a/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseOrganizationClient.cs
+++ b/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseOrganizationClient.cs
@@ -16,7 +16,7 @@ public class ObservableEnterpriseOrganizationClient : IObservableEnterpriseOrgan
public ObservableEnterpriseOrganizationClient(IGitHubClient client)
{
- Ensure.ArgumentNotNull(client, "client");
+ Ensure.ArgumentNotNull(client, nameof(client));
_client = client.Enterprise.Organization;
}
diff --git a/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseSearchIndexingClient.cs b/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseSearchIndexingClient.cs
index feb093db73..974f66638b 100644
--- a/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseSearchIndexingClient.cs
+++ b/Octokit.Reactive/Clients/Enterprise/ObservableEnterpriseSearchIndexingClient.cs
@@ -16,7 +16,7 @@ public class ObservableEnterpriseSearchIndexingClient : IObservableEnterpriseSea
public ObservableEnterpriseSearchIndexingClient(IGitHubClient client)
{
- Ensure.ArgumentNotNull(client, "client");
+ Ensure.ArgumentNotNull(client, nameof(client));
_client = client.Enterprise.SearchIndexing;
}
diff --git a/Octokit.Reactive/Clients/ObservableActivitiesClient.cs b/Octokit.Reactive/Clients/ObservableActivitiesClient.cs
index bf5213544e..edef1eed53 100644
--- a/Octokit.Reactive/Clients/ObservableActivitiesClient.cs
+++ b/Octokit.Reactive/Clients/ObservableActivitiesClient.cs
@@ -4,7 +4,7 @@ public class ObservableActivitiesClient : IObservableActivitiesClient
{
public ObservableActivitiesClient(IGitHubClient client)
{
- Ensure.ArgumentNotNull(client, "client");
+ Ensure.ArgumentNotNull(client, nameof(client));
Events = new ObservableEventsClient(client);
Watching = new ObservableWatchedClient(client);
diff --git a/Octokit.Reactive/Clients/ObservableAssigneesClient.cs b/Octokit.Reactive/Clients/ObservableAssigneesClient.cs
index eb242d635b..39c45f29ad 100644
--- a/Octokit.Reactive/Clients/ObservableAssigneesClient.cs
+++ b/Octokit.Reactive/Clients/ObservableAssigneesClient.cs
@@ -17,7 +17,7 @@ public class ObservableAssigneesClient : IObservableAssigneesClient
public ObservableAssigneesClient(IGitHubClient client)
{
- Ensure.ArgumentNotNull(client, "client");
+ Ensure.ArgumentNotNull(client, nameof(client));
_client = client.Issue.Assignee;
_connection = client.Connection;
@@ -30,8 +30,8 @@ public ObservableAssigneesClient(IGitHubClient client)
/// The name of the repository
public IObservable GetAllForRepository(string owner, string name)
{
- Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
- Ensure.ArgumentNotNullOrEmptyString(name, "name");
+ Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
+ Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
return GetAllForRepository(owner, name, ApiOptions.None);
}
@@ -53,9 +53,9 @@ public IObservable GetAllForRepository(long repositoryId)
/// The options to change API's behaviour.
public IObservable GetAllForRepository(string owner, string name, ApiOptions options)
{
- Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
- Ensure.ArgumentNotNullOrEmptyString(name, "name");
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
+ Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
+ Ensure.ArgumentNotNull(options, nameof(options));
return _connection.GetAndFlattenAllPages(ApiUrls.Assignees(owner, name), options);
}
@@ -67,7 +67,7 @@ public IObservable GetAllForRepository(string owner, string name, ApiOptio
/// The options to change API's behaviour.
public IObservable GetAllForRepository(long repositoryId, ApiOptions options)
{
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNull(options, nameof(options));
return _connection.GetAndFlattenAllPages(ApiUrls.Assignees(repositoryId), options);
}
@@ -80,9 +80,9 @@ public IObservable GetAllForRepository(long repositoryId, ApiOptions optio
/// Username of the prospective assignee
public IObservable CheckAssignee(string owner, string name, string assignee)
{
- Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
- Ensure.ArgumentNotNullOrEmptyString(name, "name");
- Ensure.ArgumentNotNullOrEmptyString(assignee, "assignee");
+ Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
+ Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
+ Ensure.ArgumentNotNullOrEmptyString(assignee, nameof(assignee));
return _client.CheckAssignee(owner, name, assignee).ToObservable();
}
@@ -96,9 +96,9 @@ public IObservable CheckAssignee(string owner, string name, string assigne
/// List of names of assignees to add
public IObservable AddAssignees(string owner, string name, int number, AssigneesUpdate assignees)
{
- Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
- Ensure.ArgumentNotNullOrEmptyString(name, "name");
- Ensure.ArgumentNotNull(assignees, "assignees");
+ Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
+ Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
+ Ensure.ArgumentNotNull(assignees, nameof(assignees));
return _client.AddAssignees(owner, name, number, assignees).ToObservable();
}
@@ -113,9 +113,9 @@ public IObservable AddAssignees(string owner, string name, int number, As
///
public IObservable RemoveAssignees(string owner, string name, int number, AssigneesUpdate assignees)
{
- Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
- Ensure.ArgumentNotNullOrEmptyString(name, "name");
- Ensure.ArgumentNotNull(assignees, "assignees");
+ Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
+ Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
+ Ensure.ArgumentNotNull(assignees, nameof(assignees));
return _client.RemoveAssignees(owner, name, number, assignees).ToObservable();
}
@@ -127,7 +127,7 @@ public IObservable RemoveAssignees(string owner, string name, int number,
/// Username of the prospective assignee
public IObservable CheckAssignee(long repositoryId, string assignee)
{
- Ensure.ArgumentNotNullOrEmptyString(assignee, "assignee");
+ Ensure.ArgumentNotNullOrEmptyString(assignee, nameof(assignee));
return _client.CheckAssignee(repositoryId, assignee).ToObservable();
}
diff --git a/Octokit.Reactive/Clients/ObservableAuthorizationsClient.cs b/Octokit.Reactive/Clients/ObservableAuthorizationsClient.cs
index e63ac304c7..7da86509db 100644
--- a/Octokit.Reactive/Clients/ObservableAuthorizationsClient.cs
+++ b/Octokit.Reactive/Clients/ObservableAuthorizationsClient.cs
@@ -12,7 +12,7 @@ public class ObservableAuthorizationsClient : IObservableAuthorizationsClient
public ObservableAuthorizationsClient(IGitHubClient client)
{
- Ensure.ArgumentNotNull(client, "client");
+ Ensure.ArgumentNotNull(client, nameof(client));
_client = client.Authorization;
_connection = client.Connection;
@@ -42,7 +42,7 @@ public IObservable GetAll()
/// A list of s for the authenticated user.
public IObservable GetAll(ApiOptions options)
{
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNull(options, nameof(options));
return _connection.GetAndFlattenAllPages(ApiUrls.Authorizations(), options);
}
@@ -79,7 +79,7 @@ public IObservable Get(int id)
/// The created .
public IObservable Create(NewAuthorization newAuthorization)
{
- Ensure.ArgumentNotNull(newAuthorization, "newAuthorization");
+ Ensure.ArgumentNotNull(newAuthorization, nameof(newAuthorization));
return _client.Create(newAuthorization).ToObservable();
}
@@ -105,8 +105,8 @@ public IObservable Create(
NewAuthorization newAuthorization,
string twoFactorAuthenticationCode)
{
- Ensure.ArgumentNotNull(newAuthorization, "newAuthorization");
- Ensure.ArgumentNotNullOrEmptyString(twoFactorAuthenticationCode, "twoFactorAuthenticationCode");
+ Ensure.ArgumentNotNull(newAuthorization, nameof(newAuthorization));
+ Ensure.ArgumentNotNullOrEmptyString(twoFactorAuthenticationCode, nameof(twoFactorAuthenticationCode));
return _client.Create(newAuthorization, twoFactorAuthenticationCode).ToObservable();
}
@@ -135,9 +135,9 @@ public IObservable Create(
string clientSecret,
NewAuthorization newAuthorization)
{
- Ensure.ArgumentNotNullOrEmptyString(clientId, "clientId");
- Ensure.ArgumentNotNullOrEmptyString(clientSecret, "clientSecret");
- Ensure.ArgumentNotNull(newAuthorization, "newAuthorization");
+ Ensure.ArgumentNotNullOrEmptyString(clientId, nameof(clientId));
+ Ensure.ArgumentNotNullOrEmptyString(clientSecret, nameof(clientSecret));
+ Ensure.ArgumentNotNull(newAuthorization, nameof(newAuthorization));
return _client.Create(clientId, clientSecret, newAuthorization).ToObservable();
}
@@ -168,10 +168,10 @@ public IObservable Create(
NewAuthorization newAuthorization,
string twoFactorAuthenticationCode)
{
- Ensure.ArgumentNotNullOrEmptyString(clientId, "clientId");
- Ensure.ArgumentNotNullOrEmptyString(clientSecret, "clientSecret");
- Ensure.ArgumentNotNull(newAuthorization, "newAuthorization");
- Ensure.ArgumentNotNullOrEmptyString(twoFactorAuthenticationCode, "twoFactorAuthenticationCode");
+ Ensure.ArgumentNotNullOrEmptyString(clientId, nameof(clientId));
+ Ensure.ArgumentNotNullOrEmptyString(clientSecret, nameof(clientSecret));
+ Ensure.ArgumentNotNull(newAuthorization, nameof(newAuthorization));
+ Ensure.ArgumentNotNullOrEmptyString(twoFactorAuthenticationCode, nameof(twoFactorAuthenticationCode));
return _client.Create(clientId, clientSecret, newAuthorization, twoFactorAuthenticationCode).ToObservable();
}
@@ -198,9 +198,9 @@ public IObservable GetOrCreateApplicationAuthenticatio
string clientSecret,
NewAuthorization newAuthorization)
{
- Ensure.ArgumentNotNullOrEmptyString(clientId, "clientId");
- Ensure.ArgumentNotNullOrEmptyString(clientSecret, "clientSecret");
- Ensure.ArgumentNotNull(newAuthorization, "newAuthorization");
+ Ensure.ArgumentNotNullOrEmptyString(clientId, nameof(clientId));
+ Ensure.ArgumentNotNullOrEmptyString(clientSecret, nameof(clientSecret));
+ Ensure.ArgumentNotNull(newAuthorization, nameof(newAuthorization));
return _client.GetOrCreateApplicationAuthentication(clientId, clientSecret, newAuthorization)
.ToObservable();
@@ -230,10 +230,10 @@ public IObservable GetOrCreateApplicationAuthenticatio
NewAuthorization newAuthorization,
string twoFactorAuthenticationCode)
{
- Ensure.ArgumentNotNullOrEmptyString(clientId, "clientId");
- Ensure.ArgumentNotNullOrEmptyString(clientSecret, "clientSecret");
- Ensure.ArgumentNotNull(newAuthorization, "newAuthorization");
- Ensure.ArgumentNotNullOrEmptyString(twoFactorAuthenticationCode, "twoFactorAuthenticationCode");
+ Ensure.ArgumentNotNullOrEmptyString(clientId, nameof(clientId));
+ Ensure.ArgumentNotNullOrEmptyString(clientSecret, nameof(clientSecret));
+ Ensure.ArgumentNotNull(newAuthorization, nameof(newAuthorization));
+ Ensure.ArgumentNotNullOrEmptyString(twoFactorAuthenticationCode, nameof(twoFactorAuthenticationCode));
return _client.GetOrCreateApplicationAuthentication(
clientId,
@@ -309,7 +309,7 @@ public IObservable RevokeApplicationAuthentication(string clientId, string
///
public IObservable Update(int id, AuthorizationUpdate authorizationUpdate)
{
- Ensure.ArgumentNotNull(authorizationUpdate, "authorizationUpdate");
+ Ensure.ArgumentNotNull(authorizationUpdate, nameof(authorizationUpdate));
return _client.Update(id, authorizationUpdate).ToObservable();
}
diff --git a/Octokit.Reactive/Clients/ObservableBlobClient.cs b/Octokit.Reactive/Clients/ObservableBlobClient.cs
index e2ebac25d3..8c52e2555b 100644
--- a/Octokit.Reactive/Clients/ObservableBlobClient.cs
+++ b/Octokit.Reactive/Clients/ObservableBlobClient.cs
@@ -15,7 +15,7 @@ public class ObservableBlobClient : IObservableBlobsClient
public ObservableBlobClient(IGitHubClient client)
{
- Ensure.ArgumentNotNull(client, "client");
+ Ensure.ArgumentNotNull(client, nameof(client));
_client = client.Git.Blob;
}
@@ -31,9 +31,9 @@ public ObservableBlobClient(IGitHubClient client)
/// The SHA of the blob
public IObservable Get(string owner, string name, string reference)
{
- Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
- Ensure.ArgumentNotNullOrEmptyString(name, "name");
- Ensure.ArgumentNotNullOrEmptyString(reference, "reference");
+ Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
+ Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
+ Ensure.ArgumentNotNullOrEmptyString(reference, nameof(reference));
return _client.Get(owner, name, reference).ToObservable();
}
@@ -48,7 +48,7 @@ public IObservable Get(string owner, string name, string reference)
/// The SHA of the blob
public IObservable Get(long repositoryId, string reference)
{
- Ensure.ArgumentNotNullOrEmptyString(reference, "reference");
+ Ensure.ArgumentNotNullOrEmptyString(reference, nameof(reference));
return _client.Get(repositoryId, reference).ToObservable();
}
@@ -64,9 +64,9 @@ public IObservable Get(long repositoryId, string reference)
/// The new Blob
public IObservable Create(string owner, string name, NewBlob newBlob)
{
- Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
- Ensure.ArgumentNotNullOrEmptyString(name, "name");
- Ensure.ArgumentNotNull(newBlob, "newBlob");
+ Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
+ Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
+ Ensure.ArgumentNotNull(newBlob, nameof(newBlob));
return _client.Create(owner, name, newBlob).ToObservable();
}
@@ -81,7 +81,7 @@ public IObservable Create(string owner, string name, NewBlob newB
/// The new Blob
public IObservable Create(long repositoryId, NewBlob newBlob)
{
- Ensure.ArgumentNotNull(newBlob, "newBlob");
+ Ensure.ArgumentNotNull(newBlob, nameof(newBlob));
return _client.Create(repositoryId, newBlob).ToObservable();
}
diff --git a/Octokit.Reactive/Clients/ObservableCommitCommentReactionsClient.cs b/Octokit.Reactive/Clients/ObservableCommitCommentReactionsClient.cs
index 5c7e965c4d..c17c50057c 100644
--- a/Octokit.Reactive/Clients/ObservableCommitCommentReactionsClient.cs
+++ b/Octokit.Reactive/Clients/ObservableCommitCommentReactionsClient.cs
@@ -17,7 +17,7 @@ public class ObservableCommitCommentReactionsClient : IObservableCommitCommentRe
public ObservableCommitCommentReactionsClient(IGitHubClient client)
{
- Ensure.ArgumentNotNull(client, "client");
+ Ensure.ArgumentNotNull(client, nameof(client));
_client = client.Reaction.CommitComment;
_connection = client.Connection;
@@ -34,9 +34,9 @@ public ObservableCommitCommentReactionsClient(IGitHubClient client)
///
public IObservable Create(string owner, string name, int number, NewReaction reaction)
{
- Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
- Ensure.ArgumentNotNullOrEmptyString(name, "name");
- Ensure.ArgumentNotNull(reaction, "reaction");
+ Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
+ Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
+ Ensure.ArgumentNotNull(reaction, nameof(reaction));
return _client.Create(owner, name, number, reaction).ToObservable();
}
@@ -51,7 +51,7 @@ public IObservable Create(string owner, string name, int number, NewRe
///
public IObservable Create(long repositoryId, int number, NewReaction reaction)
{
- Ensure.ArgumentNotNull(reaction, "reaction");
+ Ensure.ArgumentNotNull(reaction, nameof(reaction));
return _client.Create(repositoryId, number, reaction).ToObservable();
}
@@ -66,8 +66,8 @@ public IObservable Create(long repositoryId, int number, NewReaction r
///
public IObservable GetAll(string owner, string name, int number)
{
- Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
- Ensure.ArgumentNotNullOrEmptyString(name, "name");
+ Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
+ Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
return _connection.GetAndFlattenAllPages(ApiUrls.CommitCommentReactions(owner, name, number), null, AcceptHeaders.ReactionsPreview);
}
diff --git a/Octokit.Reactive/Clients/ObservableCommitStatusClient.cs b/Octokit.Reactive/Clients/ObservableCommitStatusClient.cs
index 8cf0fc04d4..a8a4784abc 100644
--- a/Octokit.Reactive/Clients/ObservableCommitStatusClient.cs
+++ b/Octokit.Reactive/Clients/ObservableCommitStatusClient.cs
@@ -17,7 +17,7 @@ public class ObservableCommitStatusClient : IObservableCommitStatusClient
public ObservableCommitStatusClient(IGitHubClient client)
{
- Ensure.ArgumentNotNull(client, "client");
+ Ensure.ArgumentNotNull(client, nameof(client));
_client = client.Repository.Status;
_connection = client.Connection;
@@ -33,9 +33,9 @@ public ObservableCommitStatusClient(IGitHubClient client)
/// The reference (SHA, branch name, or tag name) to list commits for
public IObservable GetAll(string owner, string name, string reference)
{
- Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
- Ensure.ArgumentNotNullOrEmptyString(name, "name");
- Ensure.ArgumentNotNullOrEmptyString(reference, "reference");
+ Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
+ Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
+ Ensure.ArgumentNotNullOrEmptyString(reference, nameof(reference));
return GetAll(owner, name, reference, ApiOptions.None);
}
@@ -49,7 +49,7 @@ public IObservable GetAll(string owner, string name, string refere
/// The reference (SHA, branch name, or tag name) to list commits for
public IObservable GetAll(long repositoryId, string reference)
{
- Ensure.ArgumentNotNullOrEmptyString(reference, "reference");
+ Ensure.ArgumentNotNullOrEmptyString(reference, nameof(reference));
return GetAll(repositoryId, reference, ApiOptions.None);
}
@@ -65,10 +65,10 @@ public IObservable GetAll(long repositoryId, string reference)
/// Options for changing the API response
public IObservable GetAll(string owner, string name, string reference, ApiOptions options)
{
- Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
- Ensure.ArgumentNotNullOrEmptyString(name, "name");
- Ensure.ArgumentNotNullOrEmptyString(reference, "reference");
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
+ Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
+ Ensure.ArgumentNotNullOrEmptyString(reference, nameof(reference));
+ Ensure.ArgumentNotNull(options, nameof(options));
return _connection.GetAndFlattenAllPages(ApiUrls.CommitStatuses(owner, name, reference), options);
}
@@ -83,8 +83,8 @@ public IObservable GetAll(string owner, string name, string refere
/// Options for changing the API response
public IObservable GetAll(long repositoryId, string reference, ApiOptions options)
{
- Ensure.ArgumentNotNullOrEmptyString(reference, "reference");
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNullOrEmptyString(reference, nameof(reference));
+ Ensure.ArgumentNotNull(options, nameof(options));
return _connection.GetAndFlattenAllPages(ApiUrls.CommitStatuses(repositoryId, reference), options);
}
@@ -99,9 +99,9 @@ public IObservable GetAll(long repositoryId, string reference, Api
/// The reference (SHA, branch name, or tag name) to list commits for
public IObservable GetCombined(string owner, string name, string reference)
{
- Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
- Ensure.ArgumentNotNullOrEmptyString(name, "name");
- Ensure.ArgumentNotNullOrEmptyString(reference, "reference");
+ Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
+ Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
+ Ensure.ArgumentNotNullOrEmptyString(reference, nameof(reference));
return _client.GetCombined(owner, name, reference).ToObservable();
}
@@ -115,7 +115,7 @@ public IObservable GetCombined(string owner, string name,
/// The reference (SHA, branch name, or tag name) to list commits for
public IObservable GetCombined(long repositoryId, string reference)
{
- Ensure.ArgumentNotNullOrEmptyString(reference, "reference");
+ Ensure.ArgumentNotNullOrEmptyString(reference, nameof(reference));
return _client.GetCombined(repositoryId, reference).ToObservable();
}
@@ -129,10 +129,10 @@ public IObservable GetCombined(long repositoryId, string r
/// The commit status to create
public IObservable Create(string owner, string name, string reference, NewCommitStatus newCommitStatus)
{
- Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
- Ensure.ArgumentNotNullOrEmptyString(name, "name");
- Ensure.ArgumentNotNullOrEmptyString(reference, "reference");
- Ensure.ArgumentNotNull(newCommitStatus, "newCommitStatus");
+ Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
+ Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
+ Ensure.ArgumentNotNullOrEmptyString(reference, nameof(reference));
+ Ensure.ArgumentNotNull(newCommitStatus, nameof(newCommitStatus));
return _client.Create(owner, name, reference, newCommitStatus).ToObservable();
}
@@ -145,8 +145,8 @@ public IObservable Create(string owner, string name, string refere
/// The commit status to create
public IObservable Create(long repositoryId, string reference, NewCommitStatus newCommitStatus)
{
- Ensure.ArgumentNotNullOrEmptyString(reference, "reference");
- Ensure.ArgumentNotNull(newCommitStatus, "newCommitStatus");
+ Ensure.ArgumentNotNullOrEmptyString(reference, nameof(reference));
+ Ensure.ArgumentNotNull(newCommitStatus, nameof(newCommitStatus));
return _client.Create(repositoryId, reference, newCommitStatus).ToObservable();
}
diff --git a/Octokit.Reactive/Clients/ObservableCommitsClient.cs b/Octokit.Reactive/Clients/ObservableCommitsClient.cs
index ff7bfc8573..2fb1e232cc 100644
--- a/Octokit.Reactive/Clients/ObservableCommitsClient.cs
+++ b/Octokit.Reactive/Clients/ObservableCommitsClient.cs
@@ -15,7 +15,7 @@ public class ObservableCommitsClient : IObservableCommitsClient
public ObservableCommitsClient(IGitHubClient client)
{
- Ensure.ArgumentNotNull(client, "client");
+ Ensure.ArgumentNotNull(client, nameof(client));
_client = client.Git.Commit;
}
@@ -31,9 +31,9 @@ public ObservableCommitsClient(IGitHubClient client)
/// Tha sha reference of the commit
public IObservable Get(string owner, string name, string reference)
{
- Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
- Ensure.ArgumentNotNullOrEmptyString(name, "name");
- Ensure.ArgumentNotNullOrEmptyString(reference, "reference");
+ Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
+ Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
+ Ensure.ArgumentNotNullOrEmptyString(reference, nameof(reference));
return _client.Get(owner, name, reference).ToObservable();
}
@@ -48,7 +48,7 @@ public IObservable Get(string owner, string name, string reference)
/// Tha sha reference of the commit
public IObservable Get(long repositoryId, string reference)
{
- Ensure.ArgumentNotNullOrEmptyString(reference, "reference");
+ Ensure.ArgumentNotNullOrEmptyString(reference, nameof(reference));
return _client.Get(repositoryId, reference).ToObservable();
}
@@ -64,9 +64,9 @@ public IObservable Get(long repositoryId, string reference)
/// The commit to create
public IObservable Create(string owner, string name, NewCommit commit)
{
- Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
- Ensure.ArgumentNotNullOrEmptyString(name, "name");
- Ensure.ArgumentNotNull(commit, "commit");
+ Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
+ Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
+ Ensure.ArgumentNotNull(commit, nameof(commit));
return _client.Create(owner, name, commit).ToObservable();
}
@@ -81,7 +81,7 @@ public IObservable Create(string owner, string name, NewCommit commit)
/// The commit to create
public IObservable Create(long repositoryId, NewCommit commit)
{
- Ensure.ArgumentNotNull(commit, "commit");
+ Ensure.ArgumentNotNull(commit, nameof(commit));
return _client.Create(repositoryId, commit).ToObservable();
}
diff --git a/Octokit.Reactive/Clients/ObservableDeploymentStatusClient.cs b/Octokit.Reactive/Clients/ObservableDeploymentStatusClient.cs
index 964fa8db7b..e9ec0425ff 100644
--- a/Octokit.Reactive/Clients/ObservableDeploymentStatusClient.cs
+++ b/Octokit.Reactive/Clients/ObservableDeploymentStatusClient.cs
@@ -18,7 +18,7 @@ public class ObservableDeploymentStatusClient : IObservableDeploymentStatusClien
public ObservableDeploymentStatusClient(IGitHubClient client)
{
- Ensure.ArgumentNotNull(client, "client");
+ Ensure.ArgumentNotNull(client, nameof(client));
_client = client.Repository.Deployment.Status;
_connection = client.Connection;
@@ -36,8 +36,8 @@ public ObservableDeploymentStatusClient(IGitHubClient client)
/// The id of the deployment.
public IObservable GetAll(string owner, string name, int deploymentId)
{
- Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
- Ensure.ArgumentNotNullOrEmptyString(name, "name");
+ Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
+ Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
return GetAll(owner, name, deploymentId, ApiOptions.None);
}
@@ -69,9 +69,9 @@ public IObservable GetAll(long repositoryId, int deploymentId)
/// Options for changing the API response
public IObservable GetAll(string owner, string name, int deploymentId, ApiOptions options)
{
- Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
- Ensure.ArgumentNotNullOrEmptyString(name, "name");
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
+ Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
+ Ensure.ArgumentNotNull(options, nameof(options));
return _connection.GetAndFlattenAllPages(
ApiUrls.DeploymentStatuses(owner, name, deploymentId), options);
@@ -89,7 +89,7 @@ public IObservable GetAll(string owner, string name, int deplo
/// Options for changing the API response
public IObservable GetAll(long repositoryId, int deploymentId, ApiOptions options)
{
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNull(options, nameof(options));
return _connection.GetAndFlattenAllPages(
ApiUrls.DeploymentStatuses(repositoryId, deploymentId), options);
@@ -108,9 +108,9 @@ public IObservable GetAll(long repositoryId, int deploymentId,
/// The new deployment status to create.
public IObservable Create(string owner, string name, int deploymentId, NewDeploymentStatus newDeploymentStatus)
{
- Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
- Ensure.ArgumentNotNullOrEmptyString(name, "name");
- Ensure.ArgumentNotNull(newDeploymentStatus, "newDeploymentStatus");
+ Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
+ Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
+ Ensure.ArgumentNotNull(newDeploymentStatus, nameof(newDeploymentStatus));
return _client.Create(owner, name, deploymentId, newDeploymentStatus).ToObservable();
}
@@ -127,7 +127,7 @@ public IObservable Create(string owner, string name, int deplo
/// The new deployment status to create.
public IObservable Create(long repositoryId, int deploymentId, NewDeploymentStatus newDeploymentStatus)
{
- Ensure.ArgumentNotNull(newDeploymentStatus, "newDeploymentStatus");
+ Ensure.ArgumentNotNull(newDeploymentStatus, nameof(newDeploymentStatus));
return _client.Create(repositoryId, deploymentId, newDeploymentStatus).ToObservable();
}
diff --git a/Octokit.Reactive/Clients/ObservableDeploymentsClient.cs b/Octokit.Reactive/Clients/ObservableDeploymentsClient.cs
index a0f0686805..3ba4fcf986 100644
--- a/Octokit.Reactive/Clients/ObservableDeploymentsClient.cs
+++ b/Octokit.Reactive/Clients/ObservableDeploymentsClient.cs
@@ -18,7 +18,7 @@ public class ObservableDeploymentsClient : IObservableDeploymentsClient
public ObservableDeploymentsClient(IGitHubClient client)
{
- Ensure.ArgumentNotNull(client, "client");
+ Ensure.ArgumentNotNull(client, nameof(client));
_client = client.Repository.Deployment;
_connection = client.Connection;
@@ -37,8 +37,8 @@ public ObservableDeploymentsClient(IGitHubClient client)
/// The name of the repository
public IObservable GetAll(string owner, string name)
{
- Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
- Ensure.ArgumentNotNullOrEmptyString(name, "name");
+ Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
+ Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
return GetAll(owner, name, ApiOptions.None);
}
@@ -68,9 +68,9 @@ public IObservable GetAll(long repositoryId)
/// Options for changing the API response
public IObservable GetAll(string owner, string name, ApiOptions options)
{
- Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
- Ensure.ArgumentNotNullOrEmptyString(name, "name");
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
+ Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
+ Ensure.ArgumentNotNull(options, nameof(options));
return _connection.GetAndFlattenAllPages(
ApiUrls.Deployments(owner, name), options);
@@ -87,7 +87,7 @@ public IObservable GetAll(string owner, string name, ApiOptions opti
/// Options for changing the API response
public IObservable GetAll(long repositoryId, ApiOptions options)
{
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNull(options, nameof(options));
return _connection.GetAndFlattenAllPages(
ApiUrls.Deployments(repositoryId), options);
@@ -105,7 +105,7 @@ public IObservable GetAll(long repositoryId, ApiOptions options)
/// A instance describing the new deployment to create
public IObservable Create(string owner, string name, NewDeployment newDeployment)
{
- Ensure.ArgumentNotNull(newDeployment, "newDeployment");
+ Ensure.ArgumentNotNull(newDeployment, nameof(newDeployment));
return _client.Create(owner, name, newDeployment).ToObservable();
}
@@ -121,7 +121,7 @@ public IObservable Create(string owner, string name, NewDeployment n
/// A instance describing the new deployment to create
public IObservable Create(long repositoryId, NewDeployment newDeployment)
{
- Ensure.ArgumentNotNull(newDeployment, "newDeployment");
+ Ensure.ArgumentNotNull(newDeployment, nameof(newDeployment));
return _client.Create(repositoryId, newDeployment).ToObservable();
}
diff --git a/Octokit.Reactive/Clients/ObservableEventsClient.cs b/Octokit.Reactive/Clients/ObservableEventsClient.cs
index 666fc8c1d1..1f6f436b62 100644
--- a/Octokit.Reactive/Clients/ObservableEventsClient.cs
+++ b/Octokit.Reactive/Clients/ObservableEventsClient.cs
@@ -15,7 +15,7 @@ public class ObservableEventsClient : IObservableEventsClient
public ObservableEventsClient(IGitHubClient client)
{
- Ensure.ArgumentNotNull(client, "client");
+ Ensure.ArgumentNotNull(client, nameof(client));
_connection = client.Connection;
}
@@ -40,7 +40,7 @@ public IObservable GetAll()
/// Options for changing the API response
public IObservable GetAll(ApiOptions options)
{
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNull(options, nameof(options));
return _connection.GetAndFlattenAllPages(ApiUrls.Events(), options);
}
@@ -55,8 +55,8 @@ public IObservable GetAll(ApiOptions options)
/// The name of the repository
public IObservable GetAllForRepository(string owner, string name)
{
- Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
- Ensure.ArgumentNotNullOrEmptyString(name, "name");
+ Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
+ Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
return GetAllForRepository(owner, name, ApiOptions.None);
}
@@ -84,9 +84,9 @@ public IObservable GetAllForRepository(long repositoryId)
/// Options for changing the API response
public IObservable GetAllForRepository(string owner, string name, ApiOptions options)
{
- Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
- Ensure.ArgumentNotNullOrEmptyString(name, "name");
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
+ Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
+ Ensure.ArgumentNotNull(options, nameof(options));
return _connection.GetAndFlattenAllPages(ApiUrls.Events(owner, name), options);
}
@@ -101,7 +101,7 @@ public IObservable GetAllForRepository(string owner, string name, ApiO
/// Options for changing the API response
public IObservable GetAllForRepository(long repositoryId, ApiOptions options)
{
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNull(options, nameof(options));
return _connection.GetAndFlattenAllPages(ApiUrls.Events(repositoryId), options);
}
@@ -116,8 +116,8 @@ public IObservable GetAllForRepository(long repositoryId, ApiOptions o
/// The name of the repository
public IObservable GetAllIssuesForRepository(string owner, string name)
{
- Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
- Ensure.ArgumentNotNullOrEmptyString(name, "name");
+ Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
+ Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
return GetAllIssuesForRepository(owner, name, ApiOptions.None);
}
@@ -145,9 +145,9 @@ public IObservable GetAllIssuesForRepository(long repositoryId)
/// Options for changing the API response
public IObservable GetAllIssuesForRepository(string owner, string name, ApiOptions options)
{
- Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
- Ensure.ArgumentNotNullOrEmptyString(name, "name");
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
+ Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
+ Ensure.ArgumentNotNull(options, nameof(options));
return _connection.GetAndFlattenAllPages(ApiUrls.IssuesEvents(owner, name), options);
}
@@ -162,7 +162,7 @@ public IObservable GetAllIssuesForRepository(string owner, string na
/// Options for changing the API response
public IObservable GetAllIssuesForRepository(long repositoryId, ApiOptions options)
{
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNull(options, nameof(options));
return _connection.GetAndFlattenAllPages(ApiUrls.IssuesEvents(repositoryId), options);
}
@@ -177,8 +177,8 @@ public IObservable GetAllIssuesForRepository(long repositoryId, ApiO
/// The name of the repository
public IObservable GetAllForRepositoryNetwork(string owner, string name)
{
- Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
- Ensure.ArgumentNotNullOrEmptyString(name, "name");
+ Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
+ Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
return GetAllForRepositoryNetwork(owner, name, ApiOptions.None);
}
@@ -194,9 +194,9 @@ public IObservable GetAllForRepositoryNetwork(string owner, string nam
/// Options for changing the API response
public IObservable GetAllForRepositoryNetwork(string owner, string name, ApiOptions options)
{
- Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
- Ensure.ArgumentNotNullOrEmptyString(name, "name");
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
+ Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
+ Ensure.ArgumentNotNull(options, nameof(options));
return _connection.GetAndFlattenAllPages(ApiUrls.NetworkEvents(owner, name), options);
}
@@ -210,7 +210,7 @@ public IObservable GetAllForRepositoryNetwork(string owner, string nam
/// The name of the organization
public IObservable GetAllForOrganization(string organization)
{
- Ensure.ArgumentNotNullOrEmptyString(organization, "organization");
+ Ensure.ArgumentNotNullOrEmptyString(organization, nameof(organization));
return GetAllForOrganization(organization, ApiOptions.None);
}
@@ -225,8 +225,8 @@ public IObservable GetAllForOrganization(string organization)
/// Options for changing the API response
public IObservable GetAllForOrganization(string organization, ApiOptions options)
{
- Ensure.ArgumentNotNullOrEmptyString(organization, "organization");
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNullOrEmptyString(organization, nameof(organization));
+ Ensure.ArgumentNotNull(options, nameof(options));
return _connection.GetAndFlattenAllPages(ApiUrls.OrganizationEvents(organization), options);
}
@@ -240,7 +240,7 @@ public IObservable GetAllForOrganization(string organization, ApiOptio
/// The login of the user
public IObservable GetAllUserReceived(string user)
{
- Ensure.ArgumentNotNullOrEmptyString(user, "user");
+ Ensure.ArgumentNotNullOrEmptyString(user, nameof(user));
return GetAllUserReceived(user, ApiOptions.None);
}
@@ -255,8 +255,8 @@ public IObservable GetAllUserReceived(string user)
/// Options for changing the API response
public IObservable GetAllUserReceived(string user, ApiOptions options)
{
- Ensure.ArgumentNotNullOrEmptyString(user, "user");
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNullOrEmptyString(user, nameof(user));
+ Ensure.ArgumentNotNull(options, nameof(options));
return _connection.GetAndFlattenAllPages(ApiUrls.ReceivedEvents(user), options);
}
@@ -270,7 +270,7 @@ public IObservable GetAllUserReceived(string user, ApiOptions options)
/// The login of the user
public IObservable GetAllUserReceivedPublic(string user)
{
- Ensure.ArgumentNotNullOrEmptyString(user, "user");
+ Ensure.ArgumentNotNullOrEmptyString(user, nameof(user));
return GetAllUserReceivedPublic(user, ApiOptions.None);
}
@@ -285,8 +285,8 @@ public IObservable GetAllUserReceivedPublic(string user)
/// Options for changing the API response
public IObservable GetAllUserReceivedPublic(string user, ApiOptions options)
{
- Ensure.ArgumentNotNullOrEmptyString(user, "user");
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNullOrEmptyString(user, nameof(user));
+ Ensure.ArgumentNotNull(options, nameof(options));
return _connection.GetAndFlattenAllPages(ApiUrls.ReceivedEvents(user, true), options);
}
@@ -300,7 +300,7 @@ public IObservable GetAllUserReceivedPublic(string user, ApiOptions op
/// The login of the user
public IObservable GetAllUserPerformed(string user)
{
- Ensure.ArgumentNotNullOrEmptyString(user, "user");
+ Ensure.ArgumentNotNullOrEmptyString(user, nameof(user));
return GetAllUserPerformed(user, ApiOptions.None);
}
@@ -315,8 +315,8 @@ public IObservable GetAllUserPerformed(string user)
/// Options for changing the API response
public IObservable GetAllUserPerformed(string user, ApiOptions options)
{
- Ensure.ArgumentNotNullOrEmptyString(user, "user");
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNullOrEmptyString(user, nameof(user));
+ Ensure.ArgumentNotNull(options, nameof(options));
return _connection.GetAndFlattenAllPages(ApiUrls.PerformedEvents(user), options);
}
@@ -330,7 +330,7 @@ public IObservable GetAllUserPerformed(string user, ApiOptions options
/// The login of the user
public IObservable GetAllUserPerformedPublic(string user)
{
- Ensure.ArgumentNotNullOrEmptyString(user, "user");
+ Ensure.ArgumentNotNullOrEmptyString(user, nameof(user));
return GetAllUserPerformedPublic(user, ApiOptions.None);
}
@@ -345,8 +345,8 @@ public IObservable GetAllUserPerformedPublic(string user)
/// Options for changing the API response
public IObservable GetAllUserPerformedPublic(string user, ApiOptions options)
{
- Ensure.ArgumentNotNullOrEmptyString(user, "user");
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNullOrEmptyString(user, nameof(user));
+ Ensure.ArgumentNotNull(options, nameof(options));
return _connection.GetAndFlattenAllPages(ApiUrls.PerformedEvents(user, true), options);
}
@@ -361,8 +361,8 @@ public IObservable GetAllUserPerformedPublic(string user, ApiOptions o
/// The name of the organization
public IObservable GetAllForAnOrganization(string user, string organization)
{
- Ensure.ArgumentNotNullOrEmptyString(user, "user");
- Ensure.ArgumentNotNullOrEmptyString(organization, "organization");
+ Ensure.ArgumentNotNullOrEmptyString(user, nameof(user));
+ Ensure.ArgumentNotNullOrEmptyString(organization, nameof(organization));
return GetAllForAnOrganization(user, organization, ApiOptions.None);
}
@@ -378,9 +378,9 @@ public IObservable GetAllForAnOrganization(string user, string organiz
/// Options for changing the API response
public IObservable GetAllForAnOrganization(string user, string organization, ApiOptions options)
{
- Ensure.ArgumentNotNullOrEmptyString(user, "user");
- Ensure.ArgumentNotNullOrEmptyString(organization, "organization");
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNullOrEmptyString(user, nameof(user));
+ Ensure.ArgumentNotNullOrEmptyString(organization, nameof(organization));
+ Ensure.ArgumentNotNull(options, nameof(options));
return _connection.GetAndFlattenAllPages(ApiUrls.OrganizationEvents(user, organization), options);
}
diff --git a/Octokit.Reactive/Clients/ObservableFeedsClient.cs b/Octokit.Reactive/Clients/ObservableFeedsClient.cs
index 12f2f16667..1bea312fdb 100644
--- a/Octokit.Reactive/Clients/ObservableFeedsClient.cs
+++ b/Octokit.Reactive/Clients/ObservableFeedsClient.cs
@@ -15,7 +15,7 @@ public class ObservableFeedsClient : IObservableFeedsClient
public ObservableFeedsClient(IGitHubClient client)
{
- Ensure.ArgumentNotNull(client, "client");
+ Ensure.ArgumentNotNull(client, nameof(client));
_client = client.Activity.Feeds;
}
diff --git a/Octokit.Reactive/Clients/ObservableFollowersClient.cs b/Octokit.Reactive/Clients/ObservableFollowersClient.cs
index 955b530927..b321c4f743 100644
--- a/Octokit.Reactive/Clients/ObservableFollowersClient.cs
+++ b/Octokit.Reactive/Clients/ObservableFollowersClient.cs
@@ -16,7 +16,7 @@ public class ObservableFollowersClient : IObservableFollowersClient
/// An used to make the requests
public ObservableFollowersClient(IGitHubClient client)
{
- Ensure.ArgumentNotNull(client, "client");
+ Ensure.ArgumentNotNull(client, nameof(client));
_client = client.User.Followers;
_connection = client.Connection;
@@ -44,7 +44,7 @@ public IObservable GetAllForCurrent()
/// A of s that follow the authenticated user.
public IObservable GetAllForCurrent(ApiOptions options)
{
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNull(options, nameof(options));
return _connection.GetAndFlattenAllPages(ApiUrls.Followers(), options);
}
@@ -59,7 +59,7 @@ public IObservable GetAllForCurrent(ApiOptions options)
/// A of s that follow the passed user.
public IObservable GetAll(string login)
{
- Ensure.ArgumentNotNullOrEmptyString(login, "login");
+ Ensure.ArgumentNotNullOrEmptyString(login, nameof(login));
return GetAll(login, ApiOptions.None);
}
@@ -75,8 +75,8 @@ public IObservable GetAll(string login)
/// A of s that follow the passed user.
public IObservable GetAll(string login, ApiOptions options)
{
- Ensure.ArgumentNotNullOrEmptyString(login, "login");
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNullOrEmptyString(login, nameof(login));
+ Ensure.ArgumentNotNull(options, nameof(options));
return _connection.GetAndFlattenAllPages(ApiUrls.Followers(login), options);
}
@@ -103,7 +103,7 @@ public IObservable GetAllFollowingForCurrent()
/// A of s that the authenticated user follows.
public IObservable GetAllFollowingForCurrent(ApiOptions options)
{
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNull(options, nameof(options));
return _connection.GetAndFlattenAllPages(ApiUrls.Following(), options);
}
@@ -118,7 +118,7 @@ public IObservable GetAllFollowingForCurrent(ApiOptions options)
/// A of s that the passed user follows.
public IObservable GetAllFollowing(string login)
{
- Ensure.ArgumentNotNullOrEmptyString(login, "login");
+ Ensure.ArgumentNotNullOrEmptyString(login, nameof(login));
return GetAllFollowing(login, ApiOptions.None);
}
@@ -134,8 +134,8 @@ public IObservable GetAllFollowing(string login)
/// A of s that the passed user follows.
public IObservable GetAllFollowing(string login, ApiOptions options)
{
- Ensure.ArgumentNotNullOrEmptyString(login, "login");
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNullOrEmptyString(login, nameof(login));
+ Ensure.ArgumentNotNull(options, nameof(options));
return _connection.GetAndFlattenAllPages(ApiUrls.Following(login), options);
}
@@ -150,7 +150,7 @@ public IObservable GetAllFollowing(string login, ApiOptions options)
/// A bool representing the success of the operation.
public IObservable IsFollowingForCurrent(string following)
{
- Ensure.ArgumentNotNullOrEmptyString(following, "following");
+ Ensure.ArgumentNotNullOrEmptyString(following, nameof(following));
return _client.IsFollowingForCurrent(following).ToObservable();
}
@@ -166,8 +166,8 @@ public IObservable IsFollowingForCurrent(string following)
/// A bool representing the success of the operation.
public IObservable IsFollowing(string login, string following)
{
- Ensure.ArgumentNotNullOrEmptyString(login, "login");
- Ensure.ArgumentNotNullOrEmptyString(following, "following");
+ Ensure.ArgumentNotNullOrEmptyString(login, nameof(login));
+ Ensure.ArgumentNotNullOrEmptyString(following, nameof(following));
return _client.IsFollowing(login, following).ToObservable();
}
@@ -182,7 +182,7 @@ public IObservable IsFollowing(string login, string following)
/// A bool representing the success of the operation.
public IObservable Follow(string login)
{
- Ensure.ArgumentNotNullOrEmptyString(login, "login");
+ Ensure.ArgumentNotNullOrEmptyString(login, nameof(login));
return _client.Follow(login).ToObservable();
}
@@ -197,7 +197,7 @@ public IObservable Follow(string login)
///
public IObservable Unfollow(string login)
{
- Ensure.ArgumentNotNullOrEmptyString(login, "login");
+ Ensure.ArgumentNotNullOrEmptyString(login, nameof(login));
return _client.Unfollow(login).ToObservable();
}
diff --git a/Octokit.Reactive/Clients/ObservableGistCommentsClient.cs b/Octokit.Reactive/Clients/ObservableGistCommentsClient.cs
index 240dd6f3a8..ac16b247eb 100644
--- a/Octokit.Reactive/Clients/ObservableGistCommentsClient.cs
+++ b/Octokit.Reactive/Clients/ObservableGistCommentsClient.cs
@@ -12,7 +12,7 @@ public class ObservableGistCommentsClient : IObservableGistCommentsClient
public ObservableGistCommentsClient(IGitHubClient client)
{
- Ensure.ArgumentNotNull(client, "client");
+ Ensure.ArgumentNotNull(client, nameof(client));
_client = client.Gist.Comment;
_connection = client.Connection;
@@ -38,7 +38,7 @@ public IObservable Get(string gistId, int commentId)
/// IObservable{GistComment}.
public IObservable GetAllForGist(string gistId)
{
- Ensure.ArgumentNotNullOrEmptyString(gistId, "gistId");
+ Ensure.ArgumentNotNullOrEmptyString(gistId, nameof(gistId));
return GetAllForGist(gistId, ApiOptions.None);
}
@@ -52,8 +52,8 @@ public IObservable GetAllForGist(string gistId)
/// IObservable{GistComment}.
public IObservable GetAllForGist(string gistId, ApiOptions options)
{
- Ensure.ArgumentNotNullOrEmptyString(gistId, "gistId");
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNullOrEmptyString(gistId, nameof(gistId));
+ Ensure.ArgumentNotNull(options, nameof(options));
return _connection.GetAndFlattenAllPages(ApiUrls.GistComments(gistId), options);
}
@@ -67,7 +67,7 @@ public IObservable GetAllForGist(string gistId, ApiOptions options)
/// IObservable{GistComment}.
public IObservable Create(string gistId, string comment)
{
- Ensure.ArgumentNotNullOrEmptyString(comment, "comment");
+ Ensure.ArgumentNotNullOrEmptyString(comment, nameof(comment));
return _client.Create(gistId, comment).ToObservable();
}
@@ -82,7 +82,7 @@ public IObservable Create(string gistId, string comment)
/// IObservable{GistComment}.
public IObservable Update(string gistId, int commentId, string comment)
{
- Ensure.ArgumentNotNullOrEmptyString(comment, "comment");
+ Ensure.ArgumentNotNullOrEmptyString(comment, nameof(comment));
return _client.Update(gistId, commentId, comment).ToObservable();
}
diff --git a/Octokit.Reactive/Clients/ObservableGistsClient.cs b/Octokit.Reactive/Clients/ObservableGistsClient.cs
index a76dd58d64..a97b0315c2 100644
--- a/Octokit.Reactive/Clients/ObservableGistsClient.cs
+++ b/Octokit.Reactive/Clients/ObservableGistsClient.cs
@@ -12,7 +12,7 @@ public class ObservableGistsClient : IObservableGistsClient
public ObservableGistsClient(IGitHubClient client)
{
- Ensure.ArgumentNotNull(client, "client");
+ Ensure.ArgumentNotNull(client, nameof(client));
_client = client.Gist;
_connection = client.Connection;
@@ -30,7 +30,7 @@ public ObservableGistsClient(IGitHubClient client)
/// The id of the gist
public IObservable Get(string id)
{
- Ensure.ArgumentNotNullOrEmptyString(id, "id");
+ Ensure.ArgumentNotNullOrEmptyString(id, nameof(id));
return _client.Get(id).ToObservable();
}
@@ -44,7 +44,7 @@ public IObservable Get(string id)
/// The new gist to create
public IObservable Create(NewGist newGist)
{
- Ensure.ArgumentNotNull(newGist, "newGist");
+ Ensure.ArgumentNotNull(newGist, nameof(newGist));
return _client.Create(newGist).ToObservable();
}
@@ -70,7 +70,7 @@ public IObservable Fork(string id)
/// The id of the gist
public IObservable Delete(string id)
{
- Ensure.ArgumentNotNull(id, "id");
+ Ensure.ArgumentNotNull(id, nameof(id));
return _client.Delete(id).ToObservable();
}
@@ -97,7 +97,7 @@ public IObservable GetAll()
/// Options for changing the API response
public IObservable GetAll(ApiOptions options)
{
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNull(options, nameof(options));
return _connection.GetAndFlattenAllPages(ApiUrls.Gist(), options);
}
@@ -126,7 +126,7 @@ public IObservable GetAll(DateTimeOffset since)
/// Options for changing the API response
public IObservable GetAll(DateTimeOffset since, ApiOptions options)
{
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNull(options, nameof(options));
var request = new GistRequest(since);
return _connection.GetAndFlattenAllPages(ApiUrls.Gist(), request.ToParametersDictionary(), options);
@@ -152,7 +152,7 @@ public IObservable GetAllPublic()
/// Options for changing the API response
public IObservable GetAllPublic(ApiOptions options)
{
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNull(options, nameof(options));
return _connection.GetAndFlattenAllPages(ApiUrls.PublicGists(), options);
}
@@ -179,7 +179,7 @@ public IObservable GetAllPublic(DateTimeOffset since)
/// Options for changing the API response
public IObservable GetAllPublic(DateTimeOffset since, ApiOptions options)
{
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNull(options, nameof(options));
var request = new GistRequest(since);
return _connection.GetAndFlattenAllPages(ApiUrls.PublicGists(), request.ToParametersDictionary(), options);
@@ -205,7 +205,7 @@ public IObservable GetAllStarred()
/// Options for changing the API response
public IObservable GetAllStarred(ApiOptions options)
{
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNull(options, nameof(options));
return _connection.GetAndFlattenAllPages(ApiUrls.StarredGists(), options);
}
@@ -232,7 +232,7 @@ public IObservable GetAllStarred(DateTimeOffset since)
/// Options for changing the API response
public IObservable GetAllStarred(DateTimeOffset since, ApiOptions options)
{
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNull(options, nameof(options));
var request = new GistRequest(since);
return _connection.GetAndFlattenAllPages(ApiUrls.StarredGists(), request.ToParametersDictionary(), options);
@@ -247,7 +247,7 @@ public IObservable GetAllStarred(DateTimeOffset since, ApiOptions options)
/// The user
public IObservable GetAllForUser(string user)
{
- Ensure.ArgumentNotNullOrEmptyString(user, "user");
+ Ensure.ArgumentNotNullOrEmptyString(user, nameof(user));
return GetAllForUser(user, ApiOptions.None);
}
@@ -262,8 +262,8 @@ public IObservable GetAllForUser(string user)
/// Options for changing the API response
public IObservable GetAllForUser(string user, ApiOptions options)
{
- Ensure.ArgumentNotNullOrEmptyString(user, "user");
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNullOrEmptyString(user, nameof(user));
+ Ensure.ArgumentNotNull(options, nameof(options));
return _connection.GetAndFlattenAllPages(ApiUrls.UsersGists(user), options);
}
@@ -278,7 +278,7 @@ public IObservable GetAllForUser(string user, ApiOptions options)
/// Only gists updated at or after this time are returned
public IObservable GetAllForUser(string user, DateTimeOffset since)
{
- Ensure.ArgumentNotNullOrEmptyString(user, "user");
+ Ensure.ArgumentNotNullOrEmptyString(user, nameof(user));
return GetAllForUser(user, since, ApiOptions.None);
}
@@ -294,8 +294,8 @@ public IObservable GetAllForUser(string user, DateTimeOffset since)
/// Options for changing the API response
public IObservable GetAllForUser(string user, DateTimeOffset since, ApiOptions options)
{
- Ensure.ArgumentNotNullOrEmptyString(user, "user");
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNullOrEmptyString(user, nameof(user));
+ Ensure.ArgumentNotNull(options, nameof(options));
var request = new GistRequest(since);
return _connection.GetAndFlattenAllPages(ApiUrls.UsersGists(user), request.ToParametersDictionary(), options);
@@ -310,7 +310,7 @@ public IObservable GetAllForUser(string user, DateTimeOffset since, ApiOpt
/// The id of the gist
public IObservable GetAllCommits(string id)
{
- Ensure.ArgumentNotNullOrEmptyString(id, "id");
+ Ensure.ArgumentNotNullOrEmptyString(id, nameof(id));
return GetAllCommits(id, ApiOptions.None);
}
@@ -325,8 +325,8 @@ public IObservable GetAllCommits(string id)
/// Options for changing the API response
public IObservable GetAllCommits(string id, ApiOptions options)
{
- Ensure.ArgumentNotNullOrEmptyString(id, "id");
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNullOrEmptyString(id, nameof(id));
+ Ensure.ArgumentNotNull(options, nameof(options));
return _connection.GetAndFlattenAllPages(ApiUrls.GistCommits(id), options);
}
@@ -340,7 +340,7 @@ public IObservable GetAllCommits(string id, ApiOptions options)
/// The id of the gist
public IObservable GetAllForks(string id)
{
- Ensure.ArgumentNotNullOrEmptyString(id, "id");
+ Ensure.ArgumentNotNullOrEmptyString(id, nameof(id));
return GetAllForks(id, ApiOptions.None);
}
@@ -355,8 +355,8 @@ public IObservable GetAllForks(string id)
/// Options for changing the API response
public IObservable GetAllForks(string id, ApiOptions options)
{
- Ensure.ArgumentNotNullOrEmptyString(id, "id");
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNullOrEmptyString(id, nameof(id));
+ Ensure.ArgumentNotNull(options, nameof(options));
return _connection.GetAndFlattenAllPages(ApiUrls.ForkGist(id), options);
}
@@ -371,8 +371,8 @@ public IObservable GetAllForks(string id, ApiOptions options)
/// The update to the gist
public IObservable Edit(string id, GistUpdate gistUpdate)
{
- Ensure.ArgumentNotNull(id, "id");
- Ensure.ArgumentNotNull(gistUpdate, "gistUpdate");
+ Ensure.ArgumentNotNull(id, nameof(id));
+ Ensure.ArgumentNotNull(gistUpdate, nameof(gistUpdate));
return _client.Edit(id, gistUpdate).ToObservable();
}
@@ -410,7 +410,7 @@ public IObservable Unstar(string id)
/// The id of the gist
public IObservable IsStarred(string id)
{
- Ensure.ArgumentNotNullOrEmptyString(id, "id");
+ Ensure.ArgumentNotNullOrEmptyString(id, nameof(id));
return _client.IsStarred(id).ToObservable();
}
diff --git a/Octokit.Reactive/Clients/ObservableIssueCommentReactionsClient.cs b/Octokit.Reactive/Clients/ObservableIssueCommentReactionsClient.cs
index 5b62302dc7..641e709047 100644
--- a/Octokit.Reactive/Clients/ObservableIssueCommentReactionsClient.cs
+++ b/Octokit.Reactive/Clients/ObservableIssueCommentReactionsClient.cs
@@ -17,7 +17,7 @@ public class ObservableIssueCommentReactionsClient : IObservableIssueCommentReac
public ObservableIssueCommentReactionsClient(IGitHubClient client)
{
- Ensure.ArgumentNotNull(client, "client");
+ Ensure.ArgumentNotNull(client, nameof(client));
_client = client.Reaction.IssueComment;
_connection = client.Connection;
@@ -33,9 +33,9 @@ public ObservableIssueCommentReactionsClient(IGitHubClient client)
/// The reaction to create
public IObservable Create(string owner, string name, int number, NewReaction reaction)
{
- Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
- Ensure.ArgumentNotNullOrEmptyString(name, "name");
- Ensure.ArgumentNotNull(reaction, "reaction");
+ Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
+ Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
+ Ensure.ArgumentNotNull(reaction, nameof(reaction));
return _client.Create(owner, name, number, reaction).ToObservable();
}
@@ -49,7 +49,7 @@ public IObservable Create(string owner, string name, int number, NewRe
/// The reaction to create
public IObservable Create(long repositoryId, int number, NewReaction reaction)
{
- Ensure.ArgumentNotNull(reaction, "reaction");
+ Ensure.ArgumentNotNull(reaction, nameof(reaction));
return _client.Create(repositoryId, number, reaction).ToObservable();
}
@@ -63,8 +63,8 @@ public IObservable Create(long repositoryId, int number, NewReaction r
/// The comment id
public IObservable GetAll(string owner, string name, int number)
{
- Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
- Ensure.ArgumentNotNullOrEmptyString(name, "name");
+ Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
+ Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
return _connection.GetAndFlattenAllPages(ApiUrls.IssueCommentReactions(owner, name, number), null, AcceptHeaders.ReactionsPreview);
}
diff --git a/Octokit.Reactive/Clients/ObservableIssueCommentsClient.cs b/Octokit.Reactive/Clients/ObservableIssueCommentsClient.cs
index 7069091cd1..5b21cedad9 100644
--- a/Octokit.Reactive/Clients/ObservableIssueCommentsClient.cs
+++ b/Octokit.Reactive/Clients/ObservableIssueCommentsClient.cs
@@ -18,7 +18,7 @@ public class ObservableIssueCommentsClient : IObservableIssueCommentsClient
public ObservableIssueCommentsClient(IGitHubClient client)
{
- Ensure.ArgumentNotNull(client, "client");
+ Ensure.ArgumentNotNull(client, nameof(client));
_client = client.Issue.Comment;
_connection = client.Connection;
@@ -33,8 +33,8 @@ public ObservableIssueCommentsClient(IGitHubClient client)
/// The issue comment id
public IObservable Get(string owner, string name, int id)
{
- Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
- Ensure.ArgumentNotNullOrEmptyString(name, "name");
+ Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
+ Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
return _client.Get(owner, name, id).ToObservable();
}
@@ -58,8 +58,8 @@ public IObservable Get(long repositoryId, int id)
/// The name of the repository
public IObservable GetAllForRepository(string owner, string name)
{
- Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
- Ensure.ArgumentNotNullOrEmptyString(name, "name");
+ Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
+ Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
return GetAllForRepository(owner, name, ApiOptions.None);
}
@@ -83,9 +83,9 @@ public IObservable GetAllForRepository(long repositoryId)
/// Options for changing the API response
public IObservable GetAllForRepository(string owner, string name, ApiOptions options)
{
- Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
- Ensure.ArgumentNotNullOrEmptyString(name, "name");
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
+ Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
+ Ensure.ArgumentNotNull(options, nameof(options));
return GetAllForRepository(owner, name, new IssueCommentRequest(), options);
}
@@ -98,7 +98,7 @@ public IObservable GetAllForRepository(string owner, string name,
/// Options for changing the API response
public IObservable GetAllForRepository(long repositoryId, ApiOptions options)
{
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNull(options, nameof(options));
return GetAllForRepository(repositoryId, new IssueCommentRequest(), options);
}
@@ -112,9 +112,9 @@ public IObservable GetAllForRepository(long repositoryId, ApiOptio
/// The sorting parameters
public IObservable GetAllForRepository(string owner, string name, IssueCommentRequest request)
{
- Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
- Ensure.ArgumentNotNullOrEmptyString(name, "name");
- Ensure.ArgumentNotNull(request, "request");
+ Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
+ Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
+ Ensure.ArgumentNotNull(request, nameof(request));
return GetAllForRepository(owner, name, request, ApiOptions.None);
}
@@ -127,7 +127,7 @@ public IObservable GetAllForRepository(string owner, string name,
/// The sorting parameters
public IObservable GetAllForRepository(long repositoryId, IssueCommentRequest request)
{
- Ensure.ArgumentNotNull(request, "request");
+ Ensure.ArgumentNotNull(request, nameof(request));
return GetAllForRepository(repositoryId, request, ApiOptions.None);
}
@@ -142,10 +142,10 @@ public IObservable GetAllForRepository(long repositoryId, IssueCom
/// Options for changing the API response
public IObservable GetAllForRepository(string owner, string name, IssueCommentRequest request, ApiOptions options)
{
- Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
- Ensure.ArgumentNotNullOrEmptyString(name, "name");
- Ensure.ArgumentNotNull(request, "request");
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
+ Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
+ Ensure.ArgumentNotNull(request, nameof(request));
+ Ensure.ArgumentNotNull(options, nameof(options));
return _connection.GetAndFlattenAllPages(ApiUrls.IssueComments(owner, name), request.ToParametersDictionary(), AcceptHeaders.ReactionsPreview, options);
}
@@ -159,8 +159,8 @@ public IObservable GetAllForRepository(string owner, string name,
/// Options for changing the API response
public IObservable GetAllForRepository(long repositoryId, IssueCommentRequest request, ApiOptions options)
{
- Ensure.ArgumentNotNull(request, "request");
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNull(request, nameof(request));
+ Ensure.ArgumentNotNull(options, nameof(options));
return _connection.GetAndFlattenAllPages(ApiUrls.IssueComments(repositoryId), request.ToParametersDictionary(), AcceptHeaders.ReactionsPreview, options);
}
@@ -174,8 +174,8 @@ public IObservable GetAllForRepository(long repositoryId, IssueCom
/// The issue number
public IObservable GetAllForIssue(string owner, string name, int number)
{
- Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
- Ensure.ArgumentNotNullOrEmptyString(name, "name");
+ Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
+ Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
return GetAllForIssue(owner, name, number, ApiOptions.None);
}
@@ -201,9 +201,9 @@ public IObservable GetAllForIssue(long repositoryId, int number)
/// Options for changing the API response
public IObservable GetAllForIssue(string owner, string name, int number, ApiOptions options)
{
- Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
- Ensure.ArgumentNotNullOrEmptyString(name, "name");
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
+ Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
+ Ensure.ArgumentNotNull(options, nameof(options));
return _connection.GetAndFlattenAllPages(ApiUrls.IssueComments(owner, name, number), null, AcceptHeaders.ReactionsPreview, options);
}
@@ -217,7 +217,7 @@ public IObservable GetAllForIssue(string owner, string name, int n
/// Options for changing the API response
public IObservable GetAllForIssue(long repositoryId, int number, ApiOptions options)
{
- Ensure.ArgumentNotNull(options, "options");
+ Ensure.ArgumentNotNull(options, nameof(options));
return _connection.GetAndFlattenAllPages(ApiUrls.IssueComments(repositoryId, number), options);
}
@@ -232,9 +232,9 @@ public IObservable GetAllForIssue(long repositoryId, int number, A
/// The text of the new comment
public IObservable Create(string owner, string name, int number, string newComment)
{
- Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
- Ensure.ArgumentNotNullOrEmptyString(name, "name");
- Ensure.ArgumentNotNull(newComment, "newComment");
+ Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
+ Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
+ Ensure.ArgumentNotNull(newComment, nameof(newComment));
return _client.Create(owner, name, number, newComment).ToObservable();
}
@@ -248,7 +248,7 @@ public IObservable Create(string owner, string name, int number, s
///