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

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

                Author: ASF GitHub Bot
            Created on: 11/Aug/22 06:16
            Start Date: 11/Aug/22 06:16
    Worklog Time Spent: 10m 
      Work Description: KhrystynaPopadyuk commented on code in PR #1819:
URL: https://github.com/apache/avro/pull/1819#discussion_r943126767


##########
lang/csharp/src/apache/main/Reflect/Reflection/ReflectCache.cs:
##########
@@ -19,63 +19,31 @@
 using System;
 using System.Collections;
 using System.Collections.Concurrent;
+using System.Collections.Generic;
+using System.Text;
+using Avro.Reflect.Converter;
+using Avro.Reflect.Interface;
 
-namespace Avro.Reflect
+namespace Avro.Reflect.Reflection
 {
-    /// <summary>
-    /// Class holds a cache of C# classes and their properties. The key for 
the cache is the schema full name.
-    /// </summary>
-    public class ClassCache
+    internal class ReflectCache : IReflectCache
     {
-        private static ConcurrentBag<IAvroFieldConverter> _defaultConverters = 
new ConcurrentBag<IAvroFieldConverter>();
-
+        private ConcurrentDictionary<string, Type> _nameEnumMap = new 
ConcurrentDictionary<string, Type>();

Review Comment:
   Done





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

    Worklog Id:     (was: 799894)
    Time Spent: 1h  (was: 50m)

> .NET/#C: Refactor ReflectReader/Writer: rename and refactor caches, add DI
> --------------------------------------------------------------------------
>
>                 Key: AVRO-3603
>                 URL: https://issues.apache.org/jira/browse/AVRO-3603
>             Project: Apache Avro
>          Issue Type: Improvement
>            Reporter: Khrystyna Popadyuk
>            Assignee: Khrystyna Popadyuk
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> Current ReflectReader/Writer use a lot of static entities (classes, methods, 
> fields). It is good to refactor them with interfaces and DI approach.
> If do such update at once it requires massive changes and can we difficult to 
> review and test.
> This story is created as first step for such refactoring. It will include:
>  - group classes by folders
>  - add DI
>  - rename and refactor ClassCash and EnumCache (avoid method refactoring in 
> scope of this story)
> This story do not update method implementation.
> This is breaking changes.
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to