zcsizmadia commented on pull request #1358:
URL: https://github.com/apache/avro/pull/1358#issuecomment-1027178601


   @tgnm What is the advantage using a CodecResolver delagate, instaed of 
assigning a codec to a name at registration time?
   
   Something like this, instead of RegisterResolver, have a RegisterCodec:
   `
   private static readonly ConcurrentDictionary<string, Codec> 
_registeredCodecs = new ConcurrentDictionary<string, Codec>();
   
   public static void RegisterCodec(string codecString, Codec codec)
   {
       _codecResolvers[codecString] = codec;
   }
   
   public static Codec CreateCodecFromString(string codecType)
   {
       // Check registered codecs
       if (TryGetValue(codecType, out Codec codec))
       {
           return codec;
       }
   
       ...
   }
   `


-- 
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]


Reply via email to