paulirwin commented on issue #1059:
URL: https://github.com/apache/lucenenet/issues/1059#issuecomment-2543926321

   I just had an idea, based on that last comment, if you're open to it. We 
could create non-generic interfaces (not abstract classes) that do not expose 
collections, but give you APIs to retrieve items. By using an interface instead 
of an abstract class, we wouldn't be forced to convert to/from object except 
for in the explicitly implemented methods. It also would not change the type 
hierarchy. For example:
   
   ```c#
   public interface IAllGroupsCollector : ICollector // NOTE: we'd need to keep 
this interface
   {
       int GroupCount { get; }
       object GetGroup(int index);
   }
   ```
   
   We would then explicitly implement the interface for the GetGroup method. I 
think that would be cleaner than exposing a non-generic ICollection, although I 
could be swayed on explicitly implementing that too. Thoughts?


-- 
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: dev-unsubscr...@lucenenet.apache.org

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

Reply via email to