-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Natively support injecting IReadOnlyCollection<T> and ImmutableArray<T> #134
Comments
You can get these types by importing the inbuilt 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.The text was updated successfully, but these errors were encountered: