Added readonly to fields that are never modified (#2759)

Co-authored-by: Lehonti Ramos <john@doe>
Co-authored-by: Keegan Campbell <me@kfcampbell.com>
This commit is contained in:
Lehonti Ramos
2023-08-11 18:53:51 +02:00
committed by GitHub
parent 6ab43b2d41
commit d46527d143
29 changed files with 166 additions and 166 deletions

View File

@@ -11,7 +11,7 @@ namespace Octokit.Reactive
/// </remarks>
public class ObservableGitHubAppInstallationsClient : IObservableGitHubAppInstallationsClient
{
private IGitHubAppInstallationsClient _client;
private readonly IGitHubAppInstallationsClient _client;
private readonly IConnection _connection;
public ObservableGitHubAppInstallationsClient(IGitHubClient client)

View File

@@ -12,7 +12,7 @@ namespace Octokit.Reactive
/// </remarks>
public class ObservableGitHubAppsClient : IObservableGitHubAppsClient
{
private IGitHubAppsClient _client;
private readonly IGitHubAppsClient _client;
private readonly IConnection _connection;
public ObservableGitHubAppsClient(IGitHubClient client)

View File

@@ -5,8 +5,8 @@ namespace Octokit.Reactive
{
public class ObservableCodespacesClient : IObservableCodespacesClient
{
private ICodespacesClient _client;
private IConnection _connection;
private readonly ICodespacesClient _client;
private readonly IConnection _connection;
public ObservableCodespacesClient(IGitHubClient githubClient)
{

View File

@@ -10,8 +10,8 @@ namespace Octokit.Tests.Integration.Clients
{
public class TheCreateMethod
{
IGitHubClient _github;
IGitHubClient _githubAppInstallation;
readonly IGitHubClient _github;
readonly IGitHubClient _githubAppInstallation;
public TheCreateMethod()
{
@@ -68,8 +68,8 @@ namespace Octokit.Tests.Integration.Clients
public class TheUpdateMethod
{
IGitHubClient _github;
IGitHubClient _githubAppInstallation;
readonly IGitHubClient _github;
readonly IGitHubClient _githubAppInstallation;
public TheUpdateMethod()
{
@@ -146,8 +146,8 @@ namespace Octokit.Tests.Integration.Clients
public class TheGetAllForReferenceMethod
{
IGitHubClient _github;
IGitHubClient _githubAppInstallation;
readonly IGitHubClient _github;
readonly IGitHubClient _githubAppInstallation;
public TheGetAllForReferenceMethod()
{
@@ -230,8 +230,8 @@ namespace Octokit.Tests.Integration.Clients
public class TheGetAllForCheckSuiteMethod
{
IGitHubClient _github;
IGitHubClient _githubAppInstallation;
readonly IGitHubClient _github;
readonly IGitHubClient _githubAppInstallation;
public TheGetAllForCheckSuiteMethod()
{
@@ -315,8 +315,8 @@ namespace Octokit.Tests.Integration.Clients
public class TheGetMethod
{
IGitHubClient _github;
IGitHubClient _githubAppInstallation;
readonly IGitHubClient _github;
readonly IGitHubClient _githubAppInstallation;
public TheGetMethod()
{
@@ -383,8 +383,8 @@ namespace Octokit.Tests.Integration.Clients
public class TheGetAllAnnotationsMethod
{
IGitHubClient _github;
IGitHubClient _githubAppInstallation;
readonly IGitHubClient _github;
readonly IGitHubClient _githubAppInstallation;
public TheGetAllAnnotationsMethod()
{

View File

@@ -9,8 +9,8 @@ namespace Octokit.Tests.Integration.Clients
{
public class TheGetMethod
{
IGitHubClient _github;
IGitHubClient _githubAppInstallation;
readonly IGitHubClient _github;
readonly IGitHubClient _githubAppInstallation;
public TheGetMethod()
{
@@ -59,8 +59,8 @@ namespace Octokit.Tests.Integration.Clients
public class TheGetAllForReferenceMethod
{
IGitHubClient _github;
IGitHubClient _githubAppInstallation;
readonly IGitHubClient _github;
readonly IGitHubClient _githubAppInstallation;
public TheGetAllForReferenceMethod()
{
@@ -107,8 +107,8 @@ namespace Octokit.Tests.Integration.Clients
public class TheUpdatePreferencesMethod
{
IGitHubClient _github;
IGitHubClient _githubAppInstallation;
readonly IGitHubClient _github;
readonly IGitHubClient _githubAppInstallation;
public TheUpdatePreferencesMethod()
{
@@ -155,8 +155,8 @@ namespace Octokit.Tests.Integration.Clients
public class TheCreateMethod
{
IGitHubClient _github;
IGitHubClient _githubAppInstallation;
readonly IGitHubClient _github;
readonly IGitHubClient _githubAppInstallation;
public TheCreateMethod()
{
@@ -215,8 +215,8 @@ namespace Octokit.Tests.Integration.Clients
public class TheRerequestMethod
{
IGitHubClient _github;
IGitHubClient _githubAppInstallation;
readonly IGitHubClient _github;
readonly IGitHubClient _githubAppInstallation;
public TheRerequestMethod()
{

View File

@@ -8,7 +8,7 @@ namespace Octokit.Tests.Clients
{
public class TheGetAllRepositoriesForCurrentMethod
{
IGitHubClient _github;
readonly IGitHubClient _github;
public TheGetAllRepositoriesForCurrentMethod()
{
@@ -28,7 +28,7 @@ namespace Octokit.Tests.Clients
public class TheGetAllRepositoriesForCurrentUserMethod
{
IGitHubClient _github;
readonly IGitHubClient _github;
public TheGetAllRepositoriesForCurrentUserMethod()
{

View File

@@ -9,7 +9,7 @@ namespace Octokit.Tests.Integration.Clients
{
public class TheGetMethod
{
IGitHubClient _github;
readonly IGitHubClient _github;
public TheGetMethod()
{
@@ -31,7 +31,7 @@ namespace Octokit.Tests.Integration.Clients
public class TheGetCurrentMethod
{
IGitHubClient _github;
readonly IGitHubClient _github;
public TheGetCurrentMethod()
{
@@ -53,7 +53,7 @@ namespace Octokit.Tests.Integration.Clients
public class TheGetAllInstallationsForCurrentMethod
{
IGitHubClient _github;
readonly IGitHubClient _github;
public TheGetAllInstallationsForCurrentMethod()
{
@@ -80,7 +80,7 @@ namespace Octokit.Tests.Integration.Clients
public class TheGetInstallationForCurrentMethod
{
IGitHubClient _github;
readonly IGitHubClient _github;
public TheGetInstallationForCurrentMethod()
{
@@ -109,7 +109,7 @@ namespace Octokit.Tests.Integration.Clients
public class TheGetAllInstallationsForCurrentUserMethod
{
IGitHubClient _github;
readonly IGitHubClient _github;
public TheGetAllInstallationsForCurrentUserMethod()
{
@@ -130,7 +130,7 @@ namespace Octokit.Tests.Integration.Clients
public class TheCreateInstallationTokenMethod
{
IGitHubClient _github;
readonly IGitHubClient _github;
public TheCreateInstallationTokenMethod()
{
@@ -154,7 +154,7 @@ namespace Octokit.Tests.Integration.Clients
public class TheGetOrganizationInstallationForCurrentMethod
{
IGitHubClient _github;
readonly IGitHubClient _github;
public TheGetOrganizationInstallationForCurrentMethod()
{
@@ -173,8 +173,8 @@ namespace Octokit.Tests.Integration.Clients
public class TheGetRepositoryInstallationForCurrentMethod
{
IGitHubClient _github;
IGitHubClient _githubAppInstallation;
readonly IGitHubClient _github;
readonly IGitHubClient _githubAppInstallation;
public TheGetRepositoryInstallationForCurrentMethod()
{
@@ -214,7 +214,7 @@ namespace Octokit.Tests.Integration.Clients
public class TheGetUserInstallationForCurrentMethod
{
IGitHubClient _github;
readonly IGitHubClient _github;
public TheGetUserInstallationForCurrentMethod()
{

View File

@@ -11,9 +11,9 @@ using Xunit;
public class MigrationsClientTests : IDisposable
{
private readonly IGitHubClient _gitHub;
private List<RepositoryContext> _repos;
private readonly List<RepositoryContext> _repos;
private Migration _migrationContext;
private string _orgName;
private readonly string _orgName;
private bool isExported = false;
public MigrationsClientTests()

View File

@@ -9,8 +9,8 @@ namespace Octokit.Tests.Integration.Clients
{
public class TheGetAllMethod
{
private IGitHubClient _gitHub;
private string _organizationFixture;
private readonly IGitHubClient _gitHub;
private readonly string _organizationFixture;
public TheGetAllMethod()
{
@@ -296,7 +296,7 @@ namespace Octokit.Tests.Integration.Clients
public class TheGetAllOrganizationMembershipsForCurrentMethod
{
private IGitHubClient _gitHub;
private readonly IGitHubClient _gitHub;
public TheGetAllOrganizationMembershipsForCurrentMethod()
{

View File

@@ -9,8 +9,8 @@ public class ProjectCardsClientTests
{
public class TheGetAllMethod : IDisposable
{
IGitHubClient _github;
RepositoryContext _context;
readonly IGitHubClient _github;
readonly RepositoryContext _context;
public TheGetAllMethod()
{
@@ -164,8 +164,8 @@ public class ProjectCardsClientTests
public class TheGetMethod : IDisposable
{
IGitHubClient _github;
RepositoryContext _context;
readonly IGitHubClient _github;
readonly RepositoryContext _context;
public TheGetMethod()
{
@@ -196,8 +196,8 @@ public class ProjectCardsClientTests
public class TheCreateMethod : IDisposable
{
IGitHubClient _github;
RepositoryContext _context;
readonly IGitHubClient _github;
readonly RepositoryContext _context;
public TheCreateMethod()
{
@@ -252,8 +252,8 @@ public class ProjectCardsClientTests
public class TheUpdateMethod : IDisposable
{
IGitHubClient _github;
RepositoryContext _context;
readonly IGitHubClient _github;
readonly RepositoryContext _context;
public TheUpdateMethod()
{
@@ -325,8 +325,8 @@ public class ProjectCardsClientTests
public class TheDeleteMethod : IDisposable
{
IGitHubClient _github;
RepositoryContext _context;
readonly IGitHubClient _github;
readonly RepositoryContext _context;
public TheDeleteMethod()
{
@@ -357,8 +357,8 @@ public class ProjectCardsClientTests
public class TheMoveMethod : IDisposable
{
IGitHubClient _github;
RepositoryContext _context;
readonly IGitHubClient _github;
readonly RepositoryContext _context;
public TheMoveMethod()
{

View File

@@ -11,8 +11,8 @@ public class ProjectColumnsClientTests
{
public class TheGetAllColumnsMethod : IDisposable
{
IGitHubClient _github;
RepositoryContext _context;
readonly IGitHubClient _github;
readonly RepositoryContext _context;
public TheGetAllColumnsMethod()
{
@@ -111,8 +111,8 @@ public class ProjectColumnsClientTests
public class TheGetColumnMethod : IDisposable
{
IGitHubClient _github;
RepositoryContext _context;
readonly IGitHubClient _github;
readonly RepositoryContext _context;
public TheGetColumnMethod()
{
@@ -142,8 +142,8 @@ public class ProjectColumnsClientTests
public class TheCreateColumnMethod : IDisposable
{
IGitHubClient _github;
RepositoryContext _context;
readonly IGitHubClient _github;
readonly RepositoryContext _context;
public TheCreateColumnMethod()
{
@@ -171,8 +171,8 @@ public class ProjectColumnsClientTests
public class TheUpdateColumnMethod : IDisposable
{
IGitHubClient _github;
RepositoryContext _context;
readonly IGitHubClient _github;
readonly RepositoryContext _context;
public TheUpdateColumnMethod()
{
@@ -205,8 +205,8 @@ public class ProjectColumnsClientTests
public class TheDeleteColumnMethod : IDisposable
{
IGitHubClient _github;
RepositoryContext _context;
readonly IGitHubClient _github;
readonly RepositoryContext _context;
public TheDeleteColumnMethod()
{
@@ -236,8 +236,8 @@ public class ProjectColumnsClientTests
public class TheMoveColumnMethod : IDisposable
{
IGitHubClient _github;
RepositoryContext _context;
readonly IGitHubClient _github;
readonly RepositoryContext _context;
public TheMoveColumnMethod()
{

View File

@@ -11,8 +11,8 @@ public class ProjectsClientTests
{
public class TheGetAllForRepositoryMethod : IDisposable
{
IGitHubClient _github;
RepositoryContext _context;
readonly IGitHubClient _github;
readonly RepositoryContext _context;
public TheGetAllForRepositoryMethod()
{
@@ -213,7 +213,7 @@ public class ProjectsClientTests
public class TheGetAllForOrganizationMethod
{
IGitHubClient _github;
readonly IGitHubClient _github;
public TheGetAllForOrganizationMethod()
{
@@ -286,8 +286,8 @@ public class ProjectsClientTests
public class TheGetMethod : IDisposable
{
IGitHubClient _github;
RepositoryContext _context;
readonly IGitHubClient _github;
readonly RepositoryContext _context;
public TheGetMethod()
{
@@ -317,8 +317,8 @@ public class ProjectsClientTests
public class TheUpdateMethod : IDisposable
{
IGitHubClient _github;
RepositoryContext _context;
readonly IGitHubClient _github;
readonly RepositoryContext _context;
public TheUpdateMethod()
{
@@ -355,8 +355,8 @@ public class ProjectsClientTests
public class TheDeleteMethod : IDisposable
{
IGitHubClient _github;
RepositoryContext _context;
readonly IGitHubClient _github;
readonly RepositoryContext _context;
public TheDeleteMethod()
{

View File

@@ -17,7 +17,7 @@ namespace Octokit.Tests.Integration.Helpers
UserEmail = user.Email;
}
private IConnection _connection;
private readonly IConnection _connection;
internal int UserId { get; private set; }
internal string UserLogin { get; private set; }
internal string UserEmail { get; private set; }

View File

@@ -17,7 +17,7 @@ namespace Octokit.Tests.Integration.Helpers
PublicKeyData = key.PublicKey;
}
private IConnection _connection;
private readonly IConnection _connection;
internal int GpgKeyId { get; set; }
internal string KeyId { get; set; }
internal string PublicKeyData { get; set; }

View File

@@ -17,7 +17,7 @@ namespace Octokit.Tests.Integration.Helpers
EnterpriseHelper.SetMaintenanceMode(_connection, enabled);
}
private IConnection _connection;
private readonly IConnection _connection;
public void Dispose()
{

View File

@@ -17,7 +17,7 @@ namespace Octokit.Tests.Integration.Helpers
KeyData = key.Key;
}
private IConnection _connection;
private readonly IConnection _connection;
internal int KeyId { get; private set; }
internal string KeyTitle { get; private set; }
internal string KeyData { get; private set; }

View File

@@ -19,7 +19,7 @@ namespace Octokit.Tests.Integration.Helpers
RepositoryDefaultBranch = repo.DefaultBranch;
}
private IConnection _connection;
private readonly IConnection _connection;
internal long RepositoryId { get; private set; }
internal string RepositoryOwner { get; private set; }
internal string RepositoryName { get; private set; }

View File

@@ -15,7 +15,7 @@ namespace Octokit.Tests.Integration.Helpers
Invitations = new List<string>();
}
private IConnection _connection;
private readonly IConnection _connection;
internal int TeamId { get; private set; }
internal string TeamName { get; private set; }

View File

@@ -12,8 +12,8 @@ namespace Octokit.Tests.Integration.Reactive
{
public class TheCreateMethod
{
IObservableGitHubClient _github;
IObservableGitHubClient _githubAppInstallation;
readonly IObservableGitHubClient _github;
readonly IObservableGitHubClient _githubAppInstallation;
public TheCreateMethod()
{
@@ -70,8 +70,8 @@ namespace Octokit.Tests.Integration.Reactive
public class TheUpdateMethod
{
IObservableGitHubClient _github;
IObservableGitHubClient _githubAppInstallation;
readonly IObservableGitHubClient _github;
readonly IObservableGitHubClient _githubAppInstallation;
public TheUpdateMethod()
{
@@ -148,8 +148,8 @@ namespace Octokit.Tests.Integration.Reactive
public class TheGetAllForReferenceMethod
{
IObservableGitHubClient _github;
IObservableGitHubClient _githubAppInstallation;
readonly IObservableGitHubClient _github;
readonly IObservableGitHubClient _githubAppInstallation;
public TheGetAllForReferenceMethod()
{
@@ -232,8 +232,8 @@ namespace Octokit.Tests.Integration.Reactive
public class TheGetAllForCheckSuiteMethod
{
IObservableGitHubClient _github;
IObservableGitHubClient _githubAppInstallation;
readonly IObservableGitHubClient _github;
readonly IObservableGitHubClient _githubAppInstallation;
public TheGetAllForCheckSuiteMethod()
{
@@ -316,8 +316,8 @@ namespace Octokit.Tests.Integration.Reactive
public class TheGetMethod
{
IObservableGitHubClient _github;
IObservableGitHubClient _githubAppInstallation;
readonly IObservableGitHubClient _github;
readonly IObservableGitHubClient _githubAppInstallation;
public TheGetMethod()
{
@@ -384,8 +384,8 @@ namespace Octokit.Tests.Integration.Reactive
public class TheGetAllAnnotationsMethod
{
IObservableGitHubClient _github;
IObservableGitHubClient _githubAppInstallation;
readonly IObservableGitHubClient _github;
readonly IObservableGitHubClient _githubAppInstallation;
public TheGetAllAnnotationsMethod()
{

View File

@@ -11,8 +11,8 @@ namespace Octokit.Tests.Integration.Reactive
{
public class TheGetMethod
{
IObservableGitHubClient _github;
IObservableGitHubClient _githubAppInstallation;
readonly IObservableGitHubClient _github;
readonly IObservableGitHubClient _githubAppInstallation;
public TheGetMethod()
{
@@ -61,8 +61,8 @@ namespace Octokit.Tests.Integration.Reactive
public class TheGetAllForReferenceMethod
{
IObservableGitHubClient _github;
IObservableGitHubClient _githubAppInstallation;
readonly IObservableGitHubClient _github;
readonly IObservableGitHubClient _githubAppInstallation;
public TheGetAllForReferenceMethod()
{
@@ -109,8 +109,8 @@ namespace Octokit.Tests.Integration.Reactive
public class TheUpdatePreferencesMethod
{
IObservableGitHubClient _github;
IObservableGitHubClient _githubAppInstallation;
readonly IObservableGitHubClient _github;
readonly IObservableGitHubClient _githubAppInstallation;
public TheUpdatePreferencesMethod()
{
@@ -157,8 +157,8 @@ namespace Octokit.Tests.Integration.Reactive
public class TheCreateMethod
{
IObservableGitHubClient _github;
IObservableGitHubClient _githubAppInstallation;
readonly IObservableGitHubClient _github;
readonly IObservableGitHubClient _githubAppInstallation;
public TheCreateMethod()
{
@@ -217,8 +217,8 @@ namespace Octokit.Tests.Integration.Reactive
public class TheRerequestMethod
{
IObservableGitHubClient _github;
IObservableGitHubClient _githubAppInstallation;
readonly IObservableGitHubClient _github;
readonly IObservableGitHubClient _githubAppInstallation;
public TheRerequestMethod()
{

View File

@@ -10,7 +10,7 @@ namespace Octokit.Tests.Clients
{
public class TheGetAllRepositoriesForCurrentMethod
{
IObservableGitHubClient _github;
readonly IObservableGitHubClient _github;
public TheGetAllRepositoriesForCurrentMethod()
{
@@ -30,7 +30,7 @@ namespace Octokit.Tests.Clients
public class TheGetAllRepositoriesForCurrentUserMethod
{
IObservableGitHubClient _github;
readonly IObservableGitHubClient _github;
public TheGetAllRepositoriesForCurrentUserMethod()
{

View File

@@ -11,7 +11,7 @@ namespace Octokit.Tests.Integration.Clients
{
public class TheGetMethod
{
IObservableGitHubClient _github;
readonly IObservableGitHubClient _github;
public TheGetMethod()
{
@@ -33,7 +33,7 @@ namespace Octokit.Tests.Integration.Clients
public class TheGetCurrentMethod
{
IObservableGitHubClient _github;
readonly IObservableGitHubClient _github;
public TheGetCurrentMethod()
{
@@ -55,7 +55,7 @@ namespace Octokit.Tests.Integration.Clients
public class TheGetAllInstallationsForCurrentMethod
{
IObservableGitHubClient _github;
readonly IObservableGitHubClient _github;
public TheGetAllInstallationsForCurrentMethod()
{
@@ -82,7 +82,7 @@ namespace Octokit.Tests.Integration.Clients
public class TheGetInstallationForCurrentMethod
{
IObservableGitHubClient _github;
readonly IObservableGitHubClient _github;
public TheGetInstallationForCurrentMethod()
{
@@ -111,7 +111,7 @@ namespace Octokit.Tests.Integration.Clients
public class TheGetAllInstallationsForCurrentUserMethod
{
IObservableGitHubClient _github;
readonly IObservableGitHubClient _github;
public TheGetAllInstallationsForCurrentUserMethod()
{
@@ -132,7 +132,7 @@ namespace Octokit.Tests.Integration.Clients
public class TheCreateInstallationTokenMethod
{
IObservableGitHubClient _github;
readonly IObservableGitHubClient _github;
public TheCreateInstallationTokenMethod()
{
@@ -156,7 +156,7 @@ namespace Octokit.Tests.Integration.Clients
public class TheGetOrganizationInstallationForCurrentMethod
{
IObservableGitHubClient _github;
readonly IObservableGitHubClient _github;
public TheGetOrganizationInstallationForCurrentMethod()
{
@@ -175,8 +175,8 @@ namespace Octokit.Tests.Integration.Clients
public class TheGetRepositoryInstallationForCurrentMethod
{
IObservableGitHubClient _github;
IObservableGitHubClient _githubAppInstallation;
readonly IObservableGitHubClient _github;
readonly IObservableGitHubClient _githubAppInstallation;
public TheGetRepositoryInstallationForCurrentMethod()
{
@@ -216,7 +216,7 @@ namespace Octokit.Tests.Integration.Clients
public class TheGetUserInstallationForCurrentMethod
{
IObservableGitHubClient _github;
readonly IObservableGitHubClient _github;
public TheGetUserInstallationForCurrentMethod()
{

View File

@@ -12,8 +12,8 @@ public class ObservableProjectCardsClientTests
{
public class TheGetAllMethod : IDisposable
{
IObservableGitHubClient _github;
RepositoryContext _context;
readonly IObservableGitHubClient _github;
readonly RepositoryContext _context;
public TheGetAllMethod()
{
@@ -167,8 +167,8 @@ public class ObservableProjectCardsClientTests
public class TheGetMethod : IDisposable
{
IObservableGitHubClient _github;
RepositoryContext _context;
readonly IObservableGitHubClient _github;
readonly RepositoryContext _context;
public TheGetMethod()
{
@@ -199,8 +199,8 @@ public class ObservableProjectCardsClientTests
public class TheCreateMethod : IDisposable
{
IObservableGitHubClient _github;
RepositoryContext _context;
readonly IObservableGitHubClient _github;
readonly RepositoryContext _context;
public TheCreateMethod()
{
@@ -240,8 +240,8 @@ public class ObservableProjectCardsClientTests
public class TheUpdateMethod : IDisposable
{
IObservableGitHubClient _github;
RepositoryContext _context;
readonly IObservableGitHubClient _github;
readonly RepositoryContext _context;
public TheUpdateMethod()
{
@@ -313,8 +313,8 @@ public class ObservableProjectCardsClientTests
public class TheDeleteMethod : IDisposable
{
IObservableGitHubClient _github;
RepositoryContext _context;
readonly IObservableGitHubClient _github;
readonly RepositoryContext _context;
public TheDeleteMethod()
{
@@ -345,8 +345,8 @@ public class ObservableProjectCardsClientTests
public class TheMoveMethod : IDisposable
{
IObservableGitHubClient _github;
RepositoryContext _context;
readonly IObservableGitHubClient _github;
readonly RepositoryContext _context;
public TheMoveMethod()
{

View File

@@ -13,8 +13,8 @@ public class ObservableProjectColumnsClientTests
{
public class TheGetAllColumnsMethod : IDisposable
{
IObservableGitHubClient _github;
RepositoryContext _context;
readonly IObservableGitHubClient _github;
readonly RepositoryContext _context;
public TheGetAllColumnsMethod()
{
@@ -113,8 +113,8 @@ public class ObservableProjectColumnsClientTests
public class TheGetColumnMethod : IDisposable
{
IObservableGitHubClient _github;
RepositoryContext _context;
readonly IObservableGitHubClient _github;
readonly RepositoryContext _context;
public TheGetColumnMethod()
{
@@ -144,8 +144,8 @@ public class ObservableProjectColumnsClientTests
public class TheCreateColumnMethod : IDisposable
{
IObservableGitHubClient _github;
RepositoryContext _context;
readonly IObservableGitHubClient _github;
readonly RepositoryContext _context;
public TheCreateColumnMethod()
{
@@ -173,8 +173,8 @@ public class ObservableProjectColumnsClientTests
public class TheUpdateColumnMethod : IDisposable
{
IObservableGitHubClient _github;
RepositoryContext _context;
readonly IObservableGitHubClient _github;
readonly RepositoryContext _context;
public TheUpdateColumnMethod()
{
@@ -207,8 +207,8 @@ public class ObservableProjectColumnsClientTests
public class TheDeleteColumnMethod : IDisposable
{
IObservableGitHubClient _github;
RepositoryContext _context;
readonly IObservableGitHubClient _github;
readonly RepositoryContext _context;
public TheDeleteColumnMethod()
{
@@ -238,8 +238,8 @@ public class ObservableProjectColumnsClientTests
public class TheMoveColumnMethod : IDisposable
{
IObservableGitHubClient _github;
RepositoryContext _context;
readonly IObservableGitHubClient _github;
readonly RepositoryContext _context;
public TheMoveColumnMethod()
{

View File

@@ -13,8 +13,8 @@ public class ObservableProjectsClientTests
{
public class TheGetAllForRepositoryMethod : IDisposable
{
IObservableGitHubClient _github;
RepositoryContext _context;
readonly IObservableGitHubClient _github;
readonly RepositoryContext _context;
public TheGetAllForRepositoryMethod()
{
@@ -215,7 +215,7 @@ public class ObservableProjectsClientTests
public class TheGetAllForOrganizationMethod
{
IObservableGitHubClient _github;
readonly IObservableGitHubClient _github;
public TheGetAllForOrganizationMethod()
{
@@ -288,8 +288,8 @@ public class ObservableProjectsClientTests
public class TheGetMethod : IDisposable
{
IObservableGitHubClient _github;
RepositoryContext _context;
readonly IObservableGitHubClient _github;
readonly RepositoryContext _context;
public TheGetMethod()
{
@@ -319,8 +319,8 @@ public class ObservableProjectsClientTests
public class TheUpdateMethod : IDisposable
{
IObservableGitHubClient _github;
RepositoryContext _context;
readonly IObservableGitHubClient _github;
readonly RepositoryContext _context;
public TheUpdateMethod()
{
@@ -357,8 +357,8 @@ public class ObservableProjectsClientTests
public class TheDeleteMethod : IDisposable
{
IObservableGitHubClient _github;
RepositoryContext _context;
readonly IObservableGitHubClient _github;
readonly RepositoryContext _context;
public TheDeleteMethod()
{

View File

@@ -10,8 +10,8 @@ namespace Octokit.Tests.Integration.Reactive
{
public class TheGetBranchProtectionMethod
{
IGitHubClient _github;
IObservableRepositoryBranchesClient _client;
readonly IGitHubClient _github;
readonly IObservableRepositoryBranchesClient _client;
public TheGetBranchProtectionMethod()
{
@@ -116,8 +116,8 @@ namespace Octokit.Tests.Integration.Reactive
public class TheUpdateBranchProtectionMethod
{
IGitHubClient _github;
IObservableRepositoryBranchesClient _client;
readonly IGitHubClient _github;
readonly IObservableRepositoryBranchesClient _client;
public TheUpdateBranchProtectionMethod()
{
@@ -262,8 +262,8 @@ namespace Octokit.Tests.Integration.Reactive
public class TheDeleteBranchProtectionMethod
{
IGitHubClient _github;
IObservableRepositoryBranchesClient _client;
readonly IGitHubClient _github;
readonly IObservableRepositoryBranchesClient _client;
public TheDeleteBranchProtectionMethod()
{
@@ -324,8 +324,8 @@ namespace Octokit.Tests.Integration.Reactive
public class TheGetReviewEnforcementMethod
{
IGitHubClient _github;
IObservableRepositoryBranchesClient _client;
readonly IGitHubClient _github;
readonly IObservableRepositoryBranchesClient _client;
public TheGetReviewEnforcementMethod()
{
@@ -396,8 +396,8 @@ namespace Octokit.Tests.Integration.Reactive
public class TheUpdateReviewEnforcementMethod
{
IGitHubClient _github;
IObservableRepositoryBranchesClient _client;
readonly IGitHubClient _github;
readonly IObservableRepositoryBranchesClient _client;
public TheUpdateReviewEnforcementMethod()
{
@@ -530,8 +530,8 @@ namespace Octokit.Tests.Integration.Reactive
public class TheRemoveReviewEnforcementMethod
{
IGitHubClient _github;
IObservableRepositoryBranchesClient _client;
readonly IGitHubClient _github;
readonly IObservableRepositoryBranchesClient _client;
public TheRemoveReviewEnforcementMethod()
{

View File

@@ -10,9 +10,9 @@ public class ObservableRespositoryDeployKeysClientTests : IDisposable
{
const string _key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDB8IE5+RppLpeW+6lqo0fpfvMunKg6W4bhYCfVJIOYbpKoHP95nTUMZPBT++9NLeB4/YsuNTCrrpnpjc4f2IVpGvloRiVXjAzoJk9QIL6uzn1zRFdvaxSJ3Urhe9LcLHcIgccgZgSdWGzaZI3xtMvGC4diwWNsPjvVc/RyDM/MPqAim0X5XVOQwEFsSsUSraezJ+VgYMYzLYBcKWW0B86HVVhL4ZtmcY/RN2544bljnzw2M3aQvXNPTvkuiUoqLOI+5/qzZ8PfkruO55YtweEd0lkY6oZvrBPMD6dLODEqMHb4tD6htx60wSipNqjPwpOMpzp0Bk3G909unVXi6Fw5";
const string _keyTitle = "octokit@github";
ObservableRepositoryDeployKeysClient _client;
Repository _repository;
string _owner;
readonly ObservableRepositoryDeployKeysClient _client;
readonly Repository _repository;
readonly string _owner;
public ObservableRespositoryDeployKeysClientTests()
{

View File

@@ -35,7 +35,7 @@ namespace Octokit.Internal
class GitHubSerializerStrategy : PocoJsonSerializerStrategy
{
readonly List<string> _membersWhichShouldPublishNull = new List<string>();
ConcurrentDictionary<Type, ConcurrentDictionary<object, object>> _cachedEnums = new ConcurrentDictionary<Type, ConcurrentDictionary<object, object>>();
readonly ConcurrentDictionary<Type, ConcurrentDictionary<object, object>> _cachedEnums = new ConcurrentDictionary<Type, ConcurrentDictionary<object, object>>();
protected override string MapClrMemberToJsonFieldName(MemberInfo member)
{

View File

@@ -7,7 +7,7 @@ namespace Octokit
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class ApiOptions
{
private static ApiOptions emptyOptions = new ApiOptions();
private static readonly ApiOptions emptyOptions = new ApiOptions();
public static ApiOptions None
{