Skip to content
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

Support ReadOnlyCollection<T> #762

Closed
dotnetjunkie opened this issue Oct 12, 2019 · 1 comment
Closed

Support ReadOnlyCollection<T> #762

dotnetjunkie opened this issue Oct 12, 2019 · 1 comment
Labels
Milestone

Comments

@dotnetjunkie
Copy link
Collaborator

@dotnetjunkie dotnetjunkie commented Oct 12, 2019

Simple Injector supports all kinds of collections, but does not natively understand ReadOnlyCollection<T>. As ReadOnlyCollection<T> only has one constructor, Simple Injector v4 is able to construct the type and will inject a supported IList<T>, but this makes the ReadOnlyCollection<T> Transient, which could easily cause lifestyle mismatches.

Besides supporting the concrete type Collection<T>, Simple Injector should be able to inject a singleton ReadOnlyCollection<T> as well.

@dotnetjunkie dotnetjunkie added this to the v4.8 milestone Oct 12, 2019
@dotnetjunkie dotnetjunkie added feature task and removed question labels Oct 20, 2019
@dotnetjunkie dotnetjunkie modified the milestones: v4.8, v4.9 Nov 17, 2019
@dotnetjunkie

This comment has been minimized.

Copy link
Collaborator Author

@dotnetjunkie dotnetjunkie commented Nov 24, 2019

feature-762 branch created.

@dotnetjunkie dotnetjunkie added dev-done and removed task labels Nov 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.