<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>Managed Extensibility Framework (MEF) Contrib</title><link>http://mefcontrib.codeplex.com/project/feeds/rss</link><description>MEF Contrib is a community-developed library of extensions to the Managed Extensibility Framework &amp;#40;MEF&amp;#41;, a new library in .NET.</description><item><title>Reopened Issue: Provider Model - DefinitionProviderPartCatalog does not cache values unless aggregated [1943]</title><link>http://mefcontrib.codeplex.com/workitem/1943</link><description>The DefinitionProviderPartCatalog does not cache any parts unless it&amp;#39;s added to an AggregateCatalog first. This means that when the AddProviderPart metnod is called on the CompositionContainer it will fail with an exception. The reason for this is that the method will try to retreive a ProviderComposablePartDefinition for the object instance and the cache will be empty&amp;#33;&lt;br /&gt;</description><author>TheCodeJunkie</author><pubDate>Fri, 14 Jun 2013 07:15:30 GMT</pubDate><guid isPermaLink="false">Reopened Issue: Provider Model - DefinitionProviderPartCatalog does not cache values unless aggregated [1943] 20130614071530A</guid></item><item><title>New Post: Constructor parameter injection</title><link>http://mefcontrib.codeplex.com/discussions/445006</link><description>&lt;div style="line-height: normal;"&gt;Hello,&lt;br /&gt;
&lt;br /&gt;
Can customize AppStart_MefContribMVC3 to add custom exported values ?&lt;br /&gt;
&lt;br /&gt;
I have this class &lt;br /&gt;
&lt;pre&gt;&lt;code&gt;    [Export(typeof(IUserRepository))]
    public class UserRepository : GenericRepository&amp;lt;User&amp;gt;, IUserRepository
    {
        [ImportingConstructor]
        public UserRepository(string connectionString)
            : base(connectionString)
        {

        }
    }
}&lt;/code&gt;&lt;/pre&gt;

how can I add this in AppStart_MefContribMVC3 ?&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;ComposeExportedValue(&amp;quot;connectionString&amp;quot;, &amp;quot;connection string value&amp;quot;);&lt;/code&gt;&lt;/pre&gt;

Thank you&lt;br /&gt;
&lt;/div&gt;</description><author>omar_gamil</author><pubDate>Sun, 26 May 2013 07:58:57 GMT</pubDate><guid isPermaLink="false">New Post: Constructor parameter injection 20130526075857A</guid></item><item><title>Closed Issue: Provider Model - DefinitionProviderPartCatalog does not cache values unless aggregated [1943]</title><link>http://mefcontrib.codeplex.com/workitem/1943</link><description>The DefinitionProviderPartCatalog does not cache any parts unless it&amp;#39;s added to an AggregateCatalog first. This means that when the AddProviderPart metnod is called on the CompositionContainer it will fail with an exception. The reason for this is that the method will try to retreive a ProviderComposablePartDefinition for the object instance and the cache will be empty&amp;#33;&lt;br /&gt;</description><author>TheCodeJunkie</author><pubDate>Thu, 16 May 2013 09:39:41 GMT</pubDate><guid isPermaLink="false">Closed Issue: Provider Model - DefinitionProviderPartCatalog does not cache values unless aggregated [1943] 20130516093941A</guid></item><item><title>New Comment on "Introduction to the Managed Extensibility Framework"</title><link>https://mefcontrib.codeplex.com/wikipage?title=Introduction to the Managed Extensibility Framework&amp;ANCHOR#C27116</link><description>Nice introduction to MEF. &amp;#10;Having a good time using it at work. &amp;#58;&amp;#41;</description><author>praseodeveloper</author><pubDate>Sun, 07 Apr 2013 16:55:17 GMT</pubDate><guid isPermaLink="false">New Comment on "Introduction to the Managed Extensibility Framework" 20130407045517P</guid></item><item><title>New Post: MefContrib: Interception.Unity + Integration.Unity</title><link>http://mefcontrib.codeplex.com/discussions/438235</link><description>&lt;div style="line-height: normal;"&gt;Hi&lt;br /&gt;
I'm trying to achieve something but can't get my head around how to do it. Basically I have multiple interfaces implementations marked with a custom Export attribute, so they get picked up by MEF, and the catalog in which they are is registered in a UnityContainer. The constructor of these implementations have the ImportingConstructor so unity can inject the parameters when MEF creates a requested part. This bit works just fine.&lt;br /&gt;
&lt;br /&gt;
My problem is, I need to setup interception on certain types in the catalog, and I'm using Unity interception and this cannot be changed in my scenario. Here how it was configured before using MEF to load them:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;unityContainer.RegisterType&amp;lt;IAuthenticationService, AuthenticationService&amp;gt;().Configure&amp;lt;Interception&amp;gt;().SetInterceptorFor&amp;lt;IAuthenticationService&amp;gt;(new InterfaceInterceptor());&lt;/code&gt;&lt;/pre&gt;

My new code to load these using MEF:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;DirectoryCatalog directoryCatalog = new DirectoryCatalog(&amp;quot;.&amp;quot;);
FilteredCatalog servicesCatalog = new FilteredCatalog( /* filtering on a metadata of the custom export attribute */ );

// servicesCatalog is properly populated at this point
// TODO: need to setup interception, as in the previous code block, on the servicesCatalog parts, without knowing the interface and implementation names (IAuthenticationService, AuthenticationService) except by looking at the ExportDefinitions. So I'm Stuck Here!

unityContainer.EnableCompositionIntegration();
unityContainer.RegisterCatalog(servicesCatalog);

// resolving a known interface here, loaded from MEF catalog above, works perfectly fine, Unity injects construct parameters to that instance being constructed by MEF, so my 2-way integration is fine.&lt;/code&gt;&lt;/pre&gt;

But now that all I have is a FilteredCatalog with ComposableParts, I simply don't know how to adapt my interception code using MefContrib.Interception.Unity, and I can't seem to find any documentation or samples on this matter.&lt;br /&gt;
&lt;br /&gt;
Any help would greatly be appeciated.&lt;br /&gt;
&lt;/div&gt;</description><author>rickyno</author><pubDate>Wed, 27 Mar 2013 20:55:41 GMT</pubDate><guid isPermaLink="false">New Post: MefContrib: Interception.Unity + Integration.Unity 20130327085541P</guid></item><item><title>New Comment on "Unity Integration"</title><link>http://mefcontrib.codeplex.com/wikipage?title=Unity Integration&amp;ANCHOR#C26967</link><description>Does it support Open generics&amp;#63;&amp;#10;Since as far as I tried, both using unity open-generic registration&amp;#58;&amp;#10;... RegisterType&amp;#40;typeof&amp;#40;IConfiguration&amp;#60;&amp;#62;&amp;#41;, typeof&amp;#40;FileBasedConfiguration&amp;#60;&amp;#62;&amp;#41;&amp;#41;&amp;#10;&amp;#10;and using MEFContrib open-generic solution &amp;#40;GenericCatalog &amp;#38; GenericContractRegistryBase&amp;#41;&amp;#10;it didn&amp;#39;t work. &amp;#40;inject to ImportingConstructor in this case&amp;#41;&amp;#10;&amp;#10;Without the MEF-unity integration, each open-generic solution works fine&amp;#10;&amp;#40;but without the benefits on Unity&amp;#43;MEF, of course&amp;#41;&amp;#10;&amp;#10;Thanks</description><author>barakbbn</author><pubDate>Sun, 24 Mar 2013 11:15:58 GMT</pubDate><guid isPermaLink="false">New Comment on "Unity Integration" 20130324111558A</guid></item><item><title>New Post: MVC4</title><link>http://mefcontrib.codeplex.com/discussions/401515</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;Is there Mefcontrib.MVC4? Or can some explain how I can use the Mefcontrib.MVC3 for the MVC4 application?&lt;/p&gt;
&lt;/div&gt;</description><author>JayKnowsit</author><pubDate>Thu, 01 Nov 2012 05:21:14 GMT</pubDate><guid isPermaLink="false">New Post: MVC4 20121101052114A</guid></item><item><title>New Post: MEF Exported class with Unity dependency not composed </title><link>http://mefcontrib.codeplex.com/discussions/362611</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Robert,&lt;/p&gt;
&lt;p&gt;It this something like what you want?&lt;/p&gt;
&lt;p&gt;(Note that the CompositionContainer is resolved from Unity &lt;strong&gt;BEFORE&lt;/strong&gt; ComposeParts is called)&lt;/p&gt;
&lt;pre style="font-family: Consolas; background: white; color: black; font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[&lt;span style="color: #2b91af;"&gt;TestClass&lt;/span&gt;]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;class&lt;/span&gt;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;MefUnityIntegrationTests&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;/pre&gt;
&lt;pre style="font-family: Consolas; background: white; color: black; font-size: 13px;"&gt;... 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[&lt;span style="color: #2b91af;"&gt;TestMethod&lt;/span&gt;]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;void&lt;/span&gt;&amp;nbsp;BasicMefUnityIntegrationTest()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;var&lt;/span&gt;&amp;nbsp;unityContainer&amp;nbsp;=&amp;nbsp;&lt;span style="color: blue;"&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;UnityContainer&lt;/span&gt;();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;TypeRegistrationTrackerExtension&lt;/span&gt;.RegisterIfMissing(unityContainer);
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;unityContainer.RegisterType&amp;lt;&lt;span style="color: #2b91af;"&gt;IUnityThing&lt;/span&gt;,&amp;nbsp;&lt;span style="color: #2b91af;"&gt;UnityThing&lt;/span&gt;&amp;gt;();
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;var&lt;/span&gt;&amp;nbsp;catalog&amp;nbsp;=&amp;nbsp;&lt;span style="color: blue;"&gt;new&lt;/span&gt;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;AssemblyCatalog&lt;/span&gt;(&lt;span style="color: blue;"&gt;typeof&lt;/span&gt;(&lt;span style="color: #2b91af;"&gt;MefUnityIntegrationTests&lt;/span&gt;).Assembly);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;unityContainer.RegisterCatalog(catalog);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;var&lt;/span&gt;&amp;nbsp;mefContainer&amp;nbsp;=&amp;nbsp;unityContainer.Resolve&amp;lt;&lt;span style="color: #2b91af;"&gt;CompositionContainer&lt;/span&gt;&amp;gt;();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mefContainer.ComposeParts(&lt;span style="color: blue;"&gt;this&lt;/span&gt;);
 
 
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;foreach&lt;/span&gt;&amp;nbsp;(&lt;span style="color: blue;"&gt;var&lt;/span&gt;&amp;nbsp;plugin&amp;nbsp;&lt;span style="color: blue;"&gt;in&lt;/span&gt;&amp;nbsp;MyPlugins)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;this&lt;/span&gt;.TestContext.WriteLine(&lt;span style="color: #a31515;"&gt;"Plugin.Name&amp;nbsp;=&amp;nbsp;{0}&amp;nbsp;&amp;nbsp;Plugin.Thing.Name&amp;nbsp;=&amp;nbsp;{1}"&lt;/span&gt;,&amp;nbsp;plugin.Name,&amp;nbsp;plugin.Thing.Name);&amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[&lt;span style="color: #2b91af;"&gt;ImportMany&lt;/span&gt;(&lt;span style="color: blue;"&gt;typeof&lt;/span&gt;(&lt;span style="color: #2b91af;"&gt;IPlugin&lt;/span&gt;))]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: #2b91af;"&gt;IPlugin&lt;/span&gt;&amp;gt;&amp;nbsp;MyPlugins&amp;nbsp;{&amp;nbsp;&lt;span style="color: blue;"&gt;get&lt;/span&gt;;&amp;nbsp;&lt;span style="color: blue;"&gt;set&lt;/span&gt;;&amp;nbsp;}
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;interface&lt;/span&gt;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;IPlugin&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;string&lt;/span&gt;&amp;nbsp;Name&amp;nbsp;{&amp;nbsp;&lt;span style="color: blue;"&gt;get&lt;/span&gt;;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;IUnityThing&lt;/span&gt;&amp;nbsp;Thing&amp;nbsp;{&amp;nbsp;&lt;span style="color: blue;"&gt;get&lt;/span&gt;;&amp;nbsp;&lt;span style="color: blue;"&gt;set&lt;/span&gt;;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[&lt;span style="color: #2b91af;"&gt;Export&lt;/span&gt;(&lt;span style="color: blue;"&gt;typeof&lt;/span&gt;(&lt;span style="color: #2b91af;"&gt;IPlugin&lt;/span&gt;))]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;class&lt;/span&gt;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;PluginA&lt;/span&gt;&amp;nbsp;:&amp;nbsp;&lt;span style="color: #2b91af;"&gt;IPlugin&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;string&lt;/span&gt;&amp;nbsp;Name&amp;nbsp;{&amp;nbsp;&lt;span style="color: blue;"&gt;get&lt;/span&gt;&amp;nbsp;{&amp;nbsp;&lt;span style="color: blue;"&gt;return&lt;/span&gt;&amp;nbsp;&lt;span style="color: #a31515;"&gt;"PluginA"&lt;/span&gt;;&amp;nbsp;}&amp;nbsp;}
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[&lt;span style="color: #2b91af;"&gt;Import&lt;/span&gt;]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;IUnityThing&lt;/span&gt;&amp;nbsp;Thing&amp;nbsp;{&amp;nbsp;&lt;span style="color: blue;"&gt;get&lt;/span&gt;;&amp;nbsp;&lt;span style="color: blue;"&gt;set&lt;/span&gt;;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[&lt;span style="color: #2b91af;"&gt;Export&lt;/span&gt;(&lt;span style="color: blue;"&gt;typeof&lt;/span&gt;(&lt;span style="color: #2b91af;"&gt;IPlugin&lt;/span&gt;))]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;class&lt;/span&gt;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;PluginB&lt;/span&gt;&amp;nbsp;:&amp;nbsp;&lt;span style="color: #2b91af;"&gt;IPlugin&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;string&lt;/span&gt;&amp;nbsp;Name&amp;nbsp;{&amp;nbsp;&lt;span style="color: blue;"&gt;get&lt;/span&gt;&amp;nbsp;{&amp;nbsp;&lt;span style="color: blue;"&gt;return&lt;/span&gt;&amp;nbsp;&lt;span style="color: #a31515;"&gt;"PluginB"&lt;/span&gt;;&amp;nbsp;}&amp;nbsp;}
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[&lt;span style="color: #2b91af;"&gt;Import&lt;/span&gt;]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;IUnityThing&lt;/span&gt;&amp;nbsp;Thing&amp;nbsp;{&amp;nbsp;&lt;span style="color: blue;"&gt;get&lt;/span&gt;;&amp;nbsp;&lt;span style="color: blue;"&gt;set&lt;/span&gt;;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;interface&lt;/span&gt;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;IUnityThing&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;string&lt;/span&gt;&amp;nbsp;Name&amp;nbsp;{&amp;nbsp;&lt;span style="color: blue;"&gt;get&lt;/span&gt;;&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;class&lt;/span&gt;&amp;nbsp;&lt;span style="color: #2b91af;"&gt;UnityThing&lt;/span&gt;&amp;nbsp;:&amp;nbsp;&lt;span style="color: #2b91af;"&gt;IUnityThing&lt;/span&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;public&lt;/span&gt;&amp;nbsp;&lt;span style="color: blue;"&gt;string&lt;/span&gt;&amp;nbsp;Name&amp;nbsp;{&amp;nbsp;&lt;span style="color: blue;"&gt;get&lt;/span&gt;&amp;nbsp;{&amp;nbsp;&lt;span style="color: blue;"&gt;return&lt;/span&gt;&amp;nbsp;&lt;span style="color: #a31515;"&gt;"UnityThing"&lt;/span&gt;;&amp;nbsp;}&amp;nbsp;}
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}
&lt;/pre&gt;
&lt;pre style="font-family: Consolas; background: white; color: black; font-size: 13px;"&gt;In any case, this particular example works for me, producing the following output...&lt;/pre&gt;
&lt;pre style="font-family: Consolas; background: white; color: black; font-size: 13px;"&gt;&lt;strong&gt;Plugin.Name = PluginA&amp;nbsp; Plugin.Thing.Name = UnityThing&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;Plugin.Name = PluginB&amp;nbsp; Plugin.Thing.Name = UnityThing&lt;/strong&gt;&lt;/pre&gt;
&lt;pre style="font-family: Consolas; background: white; color: black; font-size: 13px;"&gt;Regards,&lt;/pre&gt;
&lt;pre style="font-family: Consolas; background: white; color: black; font-size: 13px;"&gt;Ben&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;</description><author>bstabile</author><pubDate>Thu, 18 Oct 2012 19:08:34 GMT</pubDate><guid isPermaLink="false">New Post: MEF Exported class with Unity dependency not composed  20121018070834P</guid></item><item><title>Source code checked in, #79962</title><link>http://mefcontrib.codeplex.com/SourceControl/changeset/changes/79962</link><description>Upgrade&amp;#58; New Version of LabDefaultTemplate.xaml. To upgrade your build definitions, please visit the following link&amp;#58; http&amp;#58;&amp;#47;&amp;#47;go.microsoft.com&amp;#47;fwlink&amp;#47;&amp;#63;LinkId&amp;#61;254563</description><author>Project Collection Service Accounts</author><pubDate>Mon, 01 Oct 2012 21:14:48 GMT</pubDate><guid isPermaLink="false">Source code checked in, #79962 20121001091448P</guid></item><item><title>Source code checked in, #79961</title><link>http://mefcontrib.codeplex.com/SourceControl/changeset/changes/79961</link><description>Checked in by server upgrade</description><author>Project Collection Service Accounts</author><pubDate>Mon, 01 Oct 2012 21:08:39 GMT</pubDate><guid isPermaLink="false">Source code checked in, #79961 20121001090839P</guid></item><item><title>New Post: MEF Exported class with Unity dependency not composed </title><link>http://mefcontrib.codeplex.com/discussions/362611</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;I am quite new to this so I may be doing something real dumb but here goes.&lt;/p&gt;
&lt;p&gt;Have been using a MEF directory cataglog and a CompositionContainer to populate a list of objects and runtimes (based on the components in my directory.&lt;/p&gt;
&lt;p&gt;It goes something like this&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div style="color:black; background-color:white"&gt;
&lt;pre&gt;[ImportMany(&lt;span style="color:blue"&gt;typeof&lt;/span&gt;(IPlugin))]
&lt;span style="color:blue"&gt;public&lt;/span&gt; List&amp;lt;IPlugin&amp;gt; MyPlugins { &lt;span style="color:blue"&gt;get&lt;/span&gt;; &lt;span style="color:blue"&gt;set&lt;/span&gt;; }

&lt;span style="color:blue"&gt;var&lt;/span&gt; catalog = &lt;span style="color:blue"&gt;new&lt;/span&gt; DirectoryCatalog(&lt;span style="color:#a31515"&gt;&amp;quot;PluginFolder&amp;quot;&lt;/span&gt;);
&lt;span style="color:blue"&gt;var&lt;/span&gt; container = &lt;span style="color:blue"&gt;new&lt;/span&gt; CompositionContainer(catalog);
container.ComposeParts(&lt;span style="color:blue"&gt;this&lt;/span&gt;);&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It was working perfectly fine and populating my MyPlugins property with my 2 plugins.&lt;/p&gt;
&lt;p&gt;I have since added unity into my solution and have add a dependency to one of my plugin classes. As soon as I do this it stops appearing in my list of plugins. No error occurs - it is like my plugin has vanished as soon as it has the dependency added.&lt;/p&gt;
&lt;p&gt;I have registered my catalog against my unity container (which has already been fully registered/configured)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div style="color:black; background-color:white"&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;var&lt;/span&gt; catalog = &lt;span style="color:blue"&gt;new&lt;/span&gt; DirectoryCatalog(&lt;span style="color:#a31515"&gt;&amp;quot;PluginFolder&amp;quot;&lt;/span&gt;);
unityContainer.RegisterCatalog(catalog);
&lt;span style="color:blue"&gt;var&lt;/span&gt; container = &lt;span style="color:blue"&gt;new&lt;/span&gt; CompositionContainer(catalog);
container.ComposeParts(&lt;span style="color:blue"&gt;this&lt;/span&gt;);&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The plugin itself has its Unity-owned dependency specified like so&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;pre&gt;&lt;div style="color:black; background-color:white"&gt;&lt;pre&gt;  [Import]
  &lt;span style="color:blue"&gt;public&lt;/span&gt; IUnityHostedThing MyThing { &lt;span style="color:blue"&gt;get&lt;/span&gt;; &lt;span style="color:blue"&gt;set&lt;/span&gt;; }
&lt;/pre&gt;
&lt;/div&gt;
&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have also tried the constructor injection like so&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div style="color:black; background-color:white"&gt;
&lt;pre&gt;[ImportingConstructor]
&lt;span style="color:blue"&gt;public&lt;/span&gt; PluginA(IUnityThing thing)
{
    &lt;span style="color:blue"&gt;this&lt;/span&gt;.Mything = thing;
}
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Neither approach works and either way the class no longer gets returned by the composition container stuff.&lt;/p&gt;
&lt;p&gt;Any ideas? I haven't seen a good up to date example of this working with any actual implementations online - are there any?&lt;/p&gt;
&lt;p&gt;cheers,&lt;br&gt;
Robert&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div style="color:black; background-color:white"&gt;
&lt;pre&gt;&lt;br&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;</description><author>bertnz</author><pubDate>Tue, 10 Jul 2012 06:11:03 GMT</pubDate><guid isPermaLink="false">New Post: MEF Exported class with Unity dependency not composed  20120710061103A</guid></item><item><title>Commented Issue: Add Parameter to RegisterCatalog to add UNIQUE parts [10977]</title><link>http://mefcontrib.codeplex.com/workitem/10977</link><description>A suggestion that I believe would be beneficial to a lot of developers, would be to add the ability to register the parts of the Aggregate catalog, ignoring duplicates. &lt;br /&gt;&lt;br /&gt;The issue is, that when I register my exported parts, I get duplicate registrations for the same Export - leading me to the exception, &amp;#34;ImportCardinalityMismatchException&amp;#34;, when I try to Resolve&amp;#60;T&amp;#62;&amp;#40;&amp;#41;.&lt;br /&gt;&lt;br /&gt;There isn&amp;#39;t an easy work around that I have found and I believe it would be nice to have as part of this package. &lt;br /&gt;&lt;br /&gt;Code sample below&amp;#58;&lt;br /&gt;&lt;br /&gt;        private static void RegisterAssemblies&amp;#40;string assemblyPath, string searchPattern&amp;#41;&lt;br /&gt;        &amp;#123;&lt;br /&gt;            string&amp;#91;&amp;#93; directories &amp;#61; Directory.GetDirectories&amp;#40;assemblyPath, &amp;#34;Debug&amp;#34;, SearchOption.AllDirectories&amp;#41;&amp;#59;&lt;br /&gt;            var exportedParts &amp;#61; new AggregateCatalog&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;            foreach &amp;#40;string directory in directories&amp;#41;&lt;br /&gt;            &amp;#123;&lt;br /&gt;                var assemblyCatalog &amp;#61; new DirectoryCatalog&amp;#40;directory&amp;#41;&amp;#59;&lt;br /&gt;                exportedParts.Catalogs.Add&amp;#40;assemblyCatalog&amp;#41;&amp;#59;&lt;br /&gt;            &amp;#125;&lt;br /&gt;&lt;br /&gt;            _container.RegisterCatalog&amp;#40;exportedParts&amp;#41;&amp;#59;&lt;br /&gt;        &amp;#125;&lt;br /&gt;Comments: ** Comment from web user: montijr2007 ** &lt;p&gt;Here is what I believe would work- Add this to the UnityContainerExtensions source code for the &amp;#34;RegisterCatalog&amp;#34; method&amp;#58;&lt;/p&gt;&lt;p&gt;public static void RegisterCatalog&amp;#40;this IUnityContainer unityContainer, ComposablePartCatalog catalog&amp;#41;&lt;br /&gt;&amp;#123;&lt;br /&gt;      lock &amp;#40;unityContainer&amp;#41;&lt;br /&gt;      &amp;#123;&lt;br /&gt;           var compositionIntegration &amp;#61; EnableCompositionIntegration&amp;#40;unityContainer&amp;#41;&amp;#59;&lt;br /&gt;           compositionIntegration.Catalogs.Add&amp;#40;catalog&amp;#41;&amp;#59;&lt;/p&gt;&lt;p&gt;           IEnumerable&amp;#60;ComposablePartCatalog&amp;#62; parts &amp;#61; compositionIntegration.Catalogs.Distinct&amp;#40;&amp;#41;.ToList&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;          compositionIntegration.Catalogs.Clear&amp;#40;&amp;#41;&amp;#59;&lt;/p&gt;&lt;p&gt;           foreach &amp;#40;var part in parts&amp;#41;&lt;br /&gt;           &amp;#123;&lt;br /&gt;               compositionIntegration.Catalogs.Add&amp;#40;part&amp;#41;&amp;#59;&lt;br /&gt;           &amp;#125;&lt;/p&gt;&lt;p&gt;       &amp;#125;&lt;br /&gt; &amp;#125;&lt;/p&gt;</description><author>montijr2007</author><pubDate>Thu, 05 Jul 2012 18:53:48 GMT</pubDate><guid isPermaLink="false">Commented Issue: Add Parameter to RegisterCatalog to add UNIQUE parts [10977] 20120705065348P</guid></item><item><title>Created Issue: Add Parameter to RegisterCatalog to add UNIQUE parts [10977]</title><link>http://mefcontrib.codeplex.com/workitem/10977</link><description>A suggestion that I believe would be beneficial to a lot of developers, would be to add the ability to register the parts of the Aggregate catalog, ignoring duplicates. &lt;br /&gt;&lt;br /&gt;The issue is, that when I register my exported parts, I get duplicate registrations for the same Export - leading me to the exception, &amp;#34;ImportCardinalityMismatchException&amp;#34;, when I try to Resolve&amp;#60;T&amp;#62;&amp;#40;&amp;#41;.&lt;br /&gt;&lt;br /&gt;There isn&amp;#39;t an easy work around that I have found and I believe it would be nice to have as part of this package. &lt;br /&gt;&lt;br /&gt;Code sample below&amp;#58;&lt;br /&gt;&lt;br /&gt;        private static void RegisterAssemblies&amp;#40;string assemblyPath, string searchPattern&amp;#41;&lt;br /&gt;        &amp;#123;&lt;br /&gt;            string&amp;#91;&amp;#93; directories &amp;#61; Directory.GetDirectories&amp;#40;assemblyPath, &amp;#34;Debug&amp;#34;, SearchOption.AllDirectories&amp;#41;&amp;#59;&lt;br /&gt;            var exportedParts &amp;#61; new AggregateCatalog&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;            foreach &amp;#40;string directory in directories&amp;#41;&lt;br /&gt;            &amp;#123;&lt;br /&gt;                var assemblyCatalog &amp;#61; new DirectoryCatalog&amp;#40;directory&amp;#41;&amp;#59;&lt;br /&gt;                exportedParts.Catalogs.Add&amp;#40;assemblyCatalog&amp;#41;&amp;#59;&lt;br /&gt;            &amp;#125;&lt;br /&gt;&lt;br /&gt;            _container.RegisterCatalog&amp;#40;exportedParts&amp;#41;&amp;#59;&lt;br /&gt;        &amp;#125;&lt;br /&gt;</description><author>montijr2007</author><pubDate>Thu, 05 Jul 2012 17:10:24 GMT</pubDate><guid isPermaLink="false">Created Issue: Add Parameter to RegisterCatalog to add UNIQUE parts [10977] 20120705051024P</guid></item><item><title>New Comment on "Documentation &amp; Features"</title><link>http://mefcontrib.codeplex.com/wikipage?title=Documentation &amp; Features&amp;ANCHOR#C24216</link><description>Is there any document for MEFContrib, that includes all features and how to use that&amp;#63; That may help us as a reference.</description><author>mahatab</author><pubDate>Wed, 27 Jun 2012 06:11:39 GMT</pubDate><guid isPermaLink="false">New Comment on "Documentation &amp; Features" 20120627061139A</guid></item><item><title>Created Issue: Generic Export With Method Export [10747]</title><link>http://mefcontrib.codeplex.com/workitem/10747</link><description>Given this import&amp;#58;&lt;br /&gt;provider.GetExportedValues&amp;#60;Foo&amp;#60;int&amp;#62;&amp;#62;&amp;#40;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;This works&amp;#58;&lt;br /&gt;&amp;#91;Export&amp;#93;&lt;br /&gt;public class Foo&amp;#60;T&amp;#62;&lt;br /&gt;&amp;#123;&lt;br /&gt;    public void Blah&amp;#40;&amp;#41;&lt;br /&gt;    &amp;#123;&lt;br /&gt;    &amp;#125;&lt;br /&gt;&amp;#125;&lt;br /&gt;&amp;#40;Returns 1 export for Foo&amp;#60;int&amp;#62;&amp;#41;.&lt;br /&gt;&lt;br /&gt;This does not work&amp;#58;&lt;br /&gt;&amp;#91;Export&amp;#93;&lt;br /&gt;public class Foo&amp;#60;T&amp;#62;&lt;br /&gt;&amp;#123;&lt;br /&gt;    &amp;#91;Export&amp;#93;&lt;br /&gt;    public void Blah&amp;#40;&amp;#41;&lt;br /&gt;    &amp;#123;&lt;br /&gt;    &amp;#125;&lt;br /&gt;&amp;#125;&lt;br /&gt;&amp;#40;Returns 0 export for Foo&amp;#60;int&amp;#62;&amp;#41;&lt;br /&gt;&lt;br /&gt;I understand that the method export here seems pointless since it can&amp;#39;t possibly be imported with out-of-the-box catalogue, but this should be fine since I&amp;#39;ll be creating my own custom catalog to handle this method export. What i can&amp;#39;t understand is why Foo&amp;#60;int&amp;#62; does not return any export at all.&lt;br /&gt;</description><author>hendryluk</author><pubDate>Wed, 09 May 2012 07:11:35 GMT</pubDate><guid isPermaLink="false">Created Issue: Generic Export With Method Export [10747] 20120509071135A</guid></item><item><title>New Post: New NuGet Version, Please? :)</title><link>http://mefcontrib.codeplex.com/discussions/346628</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;Can we get a new version of this library in NuGet that has updated dependencies on Unity and also an assembly version for Silverlight? :)&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;Michael&lt;/p&gt;
&lt;/div&gt;</description><author>MichaelDBang</author><pubDate>Tue, 28 Feb 2012 21:29:12 GMT</pubDate><guid isPermaLink="false">New Post: New NuGet Version, Please? :) 20120228092912P</guid></item><item><title>New Post: GenericContractTypeMapping is a sealed class so it's not possible to derive</title><link>http://mefcontrib.codeplex.com/discussions/276561</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Can you please provide sample solution we can both work on ?&lt;/p&gt;&lt;/div&gt;</description><author>pwlodek</author><pubDate>Sat, 18 Feb 2012 19:07:40 GMT</pubDate><guid isPermaLink="false">New Post: GenericContractTypeMapping is a sealed class so it's not possible to derive 20120218070740P</guid></item><item><title>New Post: GenericContractTypeMapping is a sealed class so it's not possible to derive</title><link>http://mefcontrib.codeplex.com/discussions/276561</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;@Piotr I follow that blog post for my MVC3 application. But I get this error:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;span class="question-hyperlink"&gt;The IControllerFactory 'MefContrib.Web.Mvc.CompositionControllerFactory' did not return a controller for the name 'Home'&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Can you guide me please?&lt;/p&gt;&lt;/div&gt;</description><author>kavand</author><pubDate>Thu, 16 Feb 2012 10:46:00 GMT</pubDate><guid isPermaLink="false">New Post: GenericContractTypeMapping is a sealed class so it's not possible to derive 20120216104600A</guid></item><item><title>New Post: MefContrib.MVC3 and Lazy&lt;T&gt; imports on controllers</title><link>http://mefcontrib.codeplex.com/discussions/277162</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Can you post a small repro project so I can investigate?&lt;/p&gt;&lt;/div&gt;</description><author>maartenba</author><pubDate>Thu, 16 Feb 2012 08:21:30 GMT</pubDate><guid isPermaLink="false">New Post: MefContrib.MVC3 and Lazy&lt;T&gt; imports on controllers 20120216082130A</guid></item><item><title>New Post: MefContrib.MVC3 and Lazy&lt;T&gt; imports on controllers</title><link>http://mefcontrib.codeplex.com/discussions/277162</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;I get same error too. Can everybody help please???&lt;/p&gt;&lt;/div&gt;</description><author>kavand</author><pubDate>Thu, 16 Feb 2012 07:08:31 GMT</pubDate><guid isPermaLink="false">New Post: MefContrib.MVC3 and Lazy&lt;T&gt; imports on controllers 20120216070831A</guid></item></channel></rss>