79393630

Date: 2025-01-28 11:35:19
Score: 1
Natty:
Report link

Later in the day, I saw that I could solve this by defining the superclass as default implementation, and the subclass would be instantiated when necessary:

services.DeclareService(null, 
                       [typeof(CommonWriter)],
                        DeclarationPolicies.IsDefaultImplementation);
services.DeclareServicesFor<CustomWriter>()

the CommonWriter probably overrun all implementations because it was the first to be registered.

Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Mateus Lima Silveira