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

@@ -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
{