2
Shouts

MEF 2.0 - mini series: part 6 (Composition scoping and lifetime management) - Bnaya Eshet

published 122 days, 7 hours, 6 minutes ago posted by bnayabnaya 129 days, 21 hours, 22 minutes ago
Thursday, January 24, 2013 9:43:26 AM GMT Wednesday, January 16, 2013 7:27:36 PM GMT

in this post I will cover a new concept of scoping and part lifetime management, which is a great improvement over MEF 1.

MEF 1 was coming with a fairly naïve lifetime management. part's lifetime could be either shared or non-shared (you could also apply 'any' but eventually 'any' will be created as shared or non-shared). shared is a singleton instantiation, while non-shared will create a new instance each time.

MEF 1's instantiation model doesn't support a complex scenario where some dependency's lifetime should be dictate by the lifetime of other unites. you can conceder a UI window that is having plug-ins that should be dispose while the UI window is closing.

category: Architecture | clicked: 22 | | source: blogs.microsoft.co.il | show counter code
tags:

No comments yet, be the first one to post comment.

To post your comment please login or signup