[
https://issues.apache.org/jira/browse/AVRO-3381?focusedWorklogId=724603&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-724603
]
ASF GitHub Bot logged work on AVRO-3381:
----------------------------------------
Author: ASF GitHub Bot
Created on: 10/Feb/22 16:31
Start Date: 10/Feb/22 16:31
Worklog Time Spent: 10m
Work Description: KyleSchoonover commented on a change in pull request
#1530:
URL: https://github.com/apache/avro/pull/1530#discussion_r803864387
##########
File path: lang/csharp/src/apache/main/Generic/GenericDatumReader.cs
##########
@@ -144,7 +145,7 @@ public void AddField(object record, string fieldName, int
fieldPos, object field
}
}
- class GenericFixedAccess : FixedAccess
+ private class GenericFixedAccess : FixedAccess
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."
##########
File path: lang/csharp/src/apache/main/Generic/GenericDatumReader.cs
##########
@@ -159,17 +160,17 @@ public object CreateFixed(object reuse)
reuse : new GenericFixed(this.schema);
}
- public byte[] GetFixedBuffer( object f )
+ public byte[] GetFixedBuffer(object f)
{
return ((GenericFixed)f).Value;
}
}
- class GenericArrayAccess : ArrayAccess
+ private class GenericArrayAccess : 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."
##########
File path: lang/csharp/src/apache/main/Generic/GenericDatumReader.cs
##########
@@ -194,13 +195,13 @@ public void AddElements( object arrayObj, int elements,
int index, ReadItem item
private static void SizeTo(ref object array, int targetSize)
{
- var o = (object[]) array;
+ var o = (object[])array;
Array.Resize(ref o, targetSize);
array = o;
}
}
- class GenericMapAccess : MapAccess
+ private class GenericMapAccess : MapAccess
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: 724603)
Time Spent: 2h (was: 1h 50m)
> 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
> 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)