Closed jehof closed 5 years ago
Hi Jens,
as far as I understand this documentation it won't work that way.
I am not calling .PropertiesAutowired()
when registering the open-generics.
However you can simply inject ILogger<T>
and assign it to your property. ILogger<T>
must be registered anyway, otherwise Autofac won't be able to construct it.
If that doesn't suite your requirements, please feel free to open a pull-request.
This sounds right and may not be supported by Autofac. I have added an additional ctor to my class to inject the logger and all things are fine.
I need to inject optional dependecies into my handlers (notification) through properties. Is this supported by your library
Autofac normally provides .PropertiesAutowired() for this case.