fluffynuts commented on code in PR #196:
URL: https://github.com/apache/logging-log4net/pull/196#discussion_r1804408623


##########
src/log4net.Tests/Appender/AdoNet/Log4NetParameterCollection.cs:
##########
@@ -24,45 +24,44 @@
 using System.Collections.Generic;
 using System.Data;
 
-namespace log4net.Tests.Appender.AdoNet
+namespace log4net.Tests.Appender.AdoNet;
+
+public class Log4NetParameterCollection : CollectionBase, 
IDataParameterCollection
 {
-  public class Log4NetParameterCollection : CollectionBase, 
IDataParameterCollection
+  private readonly Dictionary<string, int> parameterNameToIndex = 
new(StringComparer.Ordinal);
+
+  protected override void OnInsertComplete(int index, object? value)
   {
-    private readonly Dictionary<string, int> m_parameterNameToIndex = 
new(StringComparer.Ordinal);
+    base.OnInsertComplete(index, value);
 
-    protected override void OnInsertComplete(int index, object? value)
+    if (value is IDataParameter param)
     {
-      base.OnInsertComplete(index, value);
-
-      if (value is IDataParameter param)
-      {
-        m_parameterNameToIndex[param.ParameterName] = index;
-      }
+      parameterNameToIndex[param.ParameterName] = index;

Review Comment:
   yeah, even with an ide, one can't just read the code and know outright - one 
has to mouse over the token in the document
   
   there are some other files that are using the `_` prefix and it's the 
recommended / default style according to Microsoft too ( 
https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/coding-style/identifier-names
 ) so it's most likely to be the code style enforced by most people if they 
were attempting to contribute.
   
   personally, I always try to stick to whatever code style is the default in 
the community because it makes contribution easier



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to