Currently viewing the tag: "mef"
In an earlier post I showed how it was possible to extend MEF with a custom part creation policy that tied the lifetime of an exported part to the lifetime of a HTTP request or session. Another common requirement I’ve encountered many times is how to make WCF services compose-able, and in this post, I’ll [...]
Out of the box, MEF provides you with limited options for defining the lifetime of exported parts. At its most basic you can define either transient or singleton lifetimes (CreationPolicy.NonShared and CreationPolicy.Shared respectively). We have to remember that although MEF can be used as an IoC container, it has been primarily designed to focus on managing composition rather than compile [...]