Property Injection does not work
See original GitHub issueI want to use the cache service in the Profile
class. I using IocManager.Instance
resolve service, but can’t unit test. Then I use property injection IIocResolver
it’s always null.
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (8 by maintainers)
Top Results From Across the Web
c# - Property injection not working
Both of them result in a cyclic dependency. The third way, when I use property injection in both of them, results in a...
Read more >Config property injection does not work in super class/base ...
Helidon MP application bootup fails with an exception if the base class of root resource has the config property injected(@Inject @ ...
Read more >Setter & Property injection not supported/working
The current implementation of DI for module development seems to only support Constructor Injection. A bunch of tutorials mention both Setter ...
Read more >Dependency injection guidelines - .NET
If a class has many injected dependencies, it might be a sign that the class has too many responsibilities and violates the Single ......
Read more >[Solved]-Property injection not working-C#
Also I think that it will only work if you will use property injection for both classes and not only in one of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So you could do something like this? Not tested it but should work 😄
Actually not sure if this would work, mappings are created in
AbpAutoMapperModule.PostInintialize()
, but the configuration action defersProfile
resolution… Give it a try? You get the idea though… I think this is what you were getting at, @maliming ?@syx670326 That’d work!
@maliming I don’t think it will having a look at it, I misunderstood what the
.Configurators
property was for…