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

Drop support for decorating uncontrolled collections using a singleton decorator #700

dotnetjunkie opened this issue May 1, 2019 · 0 comments


None yet
1 participant
Copy link

commented May 1, 2019

The ContainerUncontrolledServicesDecoratorInterceptor contains the following remark:

// Because the user registered an IEnumerable, this collection can be dynamic in nature,
// and the number of elements could change on each enumeration. It's impossible to detect if a
// returned element is supposed to be a new element and should get its own new decorator, or if
// it is supposed to be an existing element, for which an already cached decorator can be used.
// In fact we can't really cache elements as Singleton, but since this was already supported in
// the past, we don't want to introduce (yet another) breaking change.

This backwards compatibility feature has been in place for many years. It's time to ditch support for singleton decorators on container-uncontrolled collections.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.