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

As(Func<Type, IEnumerable<Type>>) and Singleton Lifetime #131

Open
lawrence-laz opened this issue Nov 12, 2020 · 2 comments
Open

As(Func<Type, IEnumerable<Type>>) and Singleton Lifetime #131

lawrence-laz opened this issue Nov 12, 2020 · 2 comments

Comments

@lawrence-laz
Copy link

Currently As(Func<Type, IEnumerable<Type>> selector); allows to specify multiple types, but all of them are registered as separate instances. This causes a problem for me with singleton lifetime as now I have multiple objects.

It feels like it should set up type forwarding similar to how ILifetimeSelector AsSelfWithInterfaces(); does.

What are your thoughts on this?

@lawrence-laz
Copy link
Author

A possible workaround for this is described here #47 (comment).

@khellang
Copy link
Owner

Maybe, but it would be a breaking change 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants