MEF and singletonsHi,<br/><br/>I have an object with more than one interface and I want to resolve this dependancies with MEF. But its important, that the instance of the object is a singleton, so how can I tell MEF to do so?<br/><br/>Thanks<br/><br/>Gerhard© 2009 Microsoft Corporation. All rights reserved.Mon, 17 Aug 2009 10:04:43 Z64a135b3-bdb1-48d5-9b96-c780fc8d8d7dhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/64a135b3-bdb1-48d5-9b96-c780fc8d8d7d#64a135b3-bdb1-48d5-9b96-c780fc8d8d7dhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/64a135b3-bdb1-48d5-9b96-c780fc8d8d7d#64a135b3-bdb1-48d5-9b96-c780fc8d8d7dGerhardhttp://social.msdn.microsoft.com/Profile/en-US/?user=GerhardMEF and singletonsHi,<br/><br/>I have an object with more than one interface and I want to resolve this dependancies with MEF. But its important, that the instance of the object is a singleton, so how can I tell MEF to do so?<br/><br/>Thanks<br/><br/>GerhardTue, 23 Jun 2009 09:47:22 Z2009-06-23T09:47:22Zhttp://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/64a135b3-bdb1-48d5-9b96-c780fc8d8d7d#77dec865-0b70-4651-9f08-fccbb56f82e3http://social.msdn.microsoft.com/Forums/en-US/MEFramework/thread/64a135b3-bdb1-48d5-9b96-c780fc8d8d7d#77dec865-0b70-4651-9f08-fccbb56f82e3Craig Kuhnerthttp://social.msdn.microsoft.com/Profile/en-US/?user=Craig%20KuhnertMEF and singletonsWhen you export your class use the creationpolicy attribute <div> <div>[PartCreationPolicy(CreationPolicy.Shared)]</div> <div>[Export(typeof(IMyInterface))]</div> <div>public class MyClass : IMyInterface</div> <div>{</div> <div>}</div> </div>Mon, 17 Aug 2009 10:04:42 Z2009-08-17T10:04:42Z