[ 
https://issues.apache.org/jira/browse/AVRO-3381?focusedWorklogId=724622&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-724622
 ]

ASF GitHub Bot logged work on AVRO-3381:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 10/Feb/22 17:08
            Start Date: 10/Feb/22 17:08
    Worklog Time Spent: 10m 
      Work Description: KyleSchoonover commented on a change in pull request 
#1530:
URL: https://github.com/apache/avro/pull/1530#discussion_r803905589



##########
File path: lang/csharp/src/apache/main/Specific/SpecificDatumWriter.cs
##########
@@ -113,56 +114,70 @@ protected override void WriteFixed(FixedSchema schema, 
object value, Encoder enc
         }
 
         /// <inheritdoc/>
-        protected override bool UnionBranchMatches( Schema sc, object obj )
+        protected override bool UnionBranchMatches(Schema sc, object obj)
         {
             if (obj == null && sc.Tag != Avro.Schema.Type.Null) return false;
             switch (sc.Tag)
             {
                 case Schema.Type.Null:
                     return obj == null;
+
                 case Schema.Type.Boolean:
                     return obj is bool;
+
                 case Schema.Type.Int:
                     return obj is int;
+
                 case Schema.Type.Long:
                     return obj is long;
+
                 case Schema.Type.Float:
                     return obj is float;
+
                 case Schema.Type.Double:
                     return obj is double;
+
                 case Schema.Type.Bytes:
                     return obj is byte[];
+
                 case Schema.Type.String:
                     return obj is string;
+
                 case Schema.Type.Error:
                 case Schema.Type.Record:
                     return obj is ISpecificRecord &&
                            ((obj as ISpecificRecord).Schema as 
RecordSchema).SchemaName.Equals((sc as RecordSchema).SchemaName);
+
                 case Schema.Type.Enumeration:
                     return obj.GetType().IsEnum && (sc as 
EnumSchema).Symbols.Contains(obj.ToString());
+
                 case Schema.Type.Array:
                     return obj is System.Collections.IList;
+
                 case Schema.Type.Map:
                     return obj is System.Collections.IDictionary;
+
                 case Schema.Type.Union:
                     return false;   // Union directly within another union not 
allowed!
                 case Schema.Type.Fixed:
                     return obj is SpecificFixed &&
                            ((obj as SpecificFixed).Schema as 
FixedSchema).SchemaName.Equals((sc as FixedSchema).SchemaName);
+
                 case Schema.Type.Logical:
                     return (sc as 
LogicalSchema).LogicalType.IsInstanceOfLogicalType(obj);
+
                 default:
                     throw new AvroException("Unknown schema type: " + sc.Tag);
             }
         }
 
-        class SpecificArrayAccess : ArrayAccess
+        private class SpecificArrayAccess : ArrayAccess

Review comment:
       By default methods are private (technically internal) unless otherwise 
set by an access modifier.
   
https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/access-modifiers
   "Classes, records, and structs declared directly within a namespace (in 
other words, that aren't nested within other classes or structs) can be either 
public or internal. internal is the default if no access modifier is specified."




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 724622)
    Time Spent: 2h 20m  (was: 2h 10m)

> Non functional changes to update styling in Avro solution
> ---------------------------------------------------------
>
>                 Key: AVRO-3381
>                 URL: https://issues.apache.org/jira/browse/AVRO-3381
>             Project: Apache Avro
>          Issue Type: Improvement
>          Components: csharp
>    Affects Versions: 1.11.0
>            Reporter: Kyle Schoonover
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 2h 20m
>  Remaining Estimate: 0h
>
> Spacing formatting fixes. 
> Reference for formatting: [Code style formatting rules - .NET | Microsoft 
> Docs|https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/formatting-rules]
>  
> Add accessibility modifiers.  Make the accessibility explicit and not implied.
> Reference: [IDE0040: Add accessibility modifiers - .NET | Microsoft 
> Docs|https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0040]
>  
> Remove and sort using statements:  Sorting doesn't really do anything, but 
> the remove part will speed up code analysis tools.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to