Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dont abstract type for private fields #1409

Merged

Conversation

SimonCropp
Copy link
Contributor

No description provided.

@baywet baywet enabled auto-merge October 6, 2023 11:48
@@ -17,11 +17,11 @@
/// </summary>
public sealed class ValidationRuleSet : IEnumerable<ValidationRule>
{
private IDictionary<Type, IList<ValidationRule>> _rules = new Dictionary<Type, IList<ValidationRule>>();
private Dictionary<Type, IList<ValidationRule>> _rules = new();

Check notice

Code scanning / CodeQL

Missed 'readonly' opportunity

Field '_rules' can be 'readonly'.

private static ValidationRuleSet _defaultRuleSet;

private IList<ValidationRule> _emptyRules = new List<ValidationRule>();
private List<ValidationRule> _emptyRules = new();

Check notice

Code scanning / CodeQL

Missed 'readonly' opportunity

Field '_emptyRules' can be 'readonly'.
@@ -30,7 +30,7 @@
Diagnostic = diagnostic;
}

private IDictionary<Type, Func<ParseNode, object>> _loaders = new Dictionary<Type, Func<ParseNode, object>>
private Dictionary<Type, Func<ParseNode, object>> _loaders = new()

Check notice

Code scanning / CodeQL

Missed 'readonly' opportunity

Field '_loaders' can be 'readonly'.
@@ -32,7 +32,7 @@
Diagnostic = diagnostic;
}

private IDictionary<Type, Func<ParseNode, object>> _loaders = new Dictionary<Type, Func<ParseNode, object>>
private Dictionary<Type, Func<ParseNode, object>> _loaders = new()

Check notice

Code scanning / CodeQL

Missed 'readonly' opportunity

Field '_loaders' can be 'readonly'.
@baywet baywet merged commit 62999e8 into microsoft:vnext Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants