4 ms·
That doesn't work unless you already have the using statements, which you won't have as you haven't added it yet. I just tried it.
by mattmanser 6y ago
That doesn't work unless you already have the using statements, which you won't have as you haven't added it yet.
I just tried it.
- deleted 6y ago[deleted]
- tester756 6y agoI'm using Roslynator: https://i.imgur.com/cWs1M77.png https://i.imgur.com/cWs1M77.png and I have some naming rule https://i.imgur.com/iPwNj5b.png https://i.imgur.com/iPwNj5b.png So I basically have to type IOptions<T> Name and use ctrl+. twice in order to generate private readonly property and initialize it and add using to IOptions
- merb 6y agoyou can use property injection when you use something like autofac as the di container.
- FridgeSeal 6y agoCool, so I'll add another dependency and figure out how to use that, to save myself time having to write out MS's convoluted dependency-injected configuration code.
- merb 6y agowell you don't need to use dependency injection at all. there. is no need to use IConfiguration. also as far as I heard, is that microsoft is working on a micro web framework, that does not use di. (something like https://github.com/featherhttp/framework https://github.com/featherhttp/framework, just more official i guess)
- nightski 6y agoMeanwhile one could of have this solved in their projects in less than the time it took to have this HN discussion and moved on with their life. Seriously, somethings are worth complaining over, others are not.