Closed jnm2 closed 3 years ago
You can get these types by importing the inbuilt StrongInject.Modules.StandardModule
.
The reason I didn't make these automatically available is that at the time I found the model of how they would be user overridden complex to reason about. It may be that if I think about this a bit more I'll decide it's actually relatively straightforward.
Thanks! There are other things in there that I will want too. Could the error messages give this hint when the missing type is in the standard module?
That's definitely a good option. It can on the backlog! :-)
Okay, I added it to the backlog. You can close this unless you would like to use this issue to track the further thought you mentioned.
It's nice if classes don't require a type that they can mutate (
T[]
). It's a small thing, but it could matter if the type is also used without StrongInject, for example in test code.I use
ImmutableArray<T>
except in existing projects that can't or don't yet reference System.Collections.Immutable.The reason I'm not asking about
IReadOnlyList<T>
is that I use that type instead ofIReadOnlyCollection<T>
when I want to imply that the index order is significant. I'm assuming that StrongInject doesn't have an ordering guarantee that is obvious to the reader since it could be collecting implementations from various separate files.