UvodDoKomponent: MEFmore |
from Wiki KIVu |
Nicely writen article about "Mef vs IoC" here.
DI is based on three dimensions, Object Composition, Lifetime Management, and Interception. MEF has potential, but as a DI container, it lacks:
For Lifestyle it lacks:
Its a option to use MEF as a Extension for standard IoC container more.
Helps to see what is going on inside the MEF Composition Container. Download
Container = new CompositionContainer( new AggregateCatalog( new AssemblyCatalog( Assembly.GetExecutingAssembly() ) , new AssemblyCatalog( Assembly.LoadFrom( @"MEFVisualizer.Exe" ) ) ) ); Container.Compose( batch ); var meftoDgml = new MEFToDGML( Container){ IsNamespaceGrouping = true }; // The Visualizer meftoDgml.WriteToDGMLFile(); // Write to DGML file
IoC
, DI vs MEF
http://channel9.msdn.com/posts/NET-45-Oleg-Lvovitch-and-Kevin-Ransom-Managed-Extensibility-Framework-MEF-20 http://www.codeproject.com/Articles/376033/From-Zero-to-Proficient-with-MEF http://www.codeproject.com/Articles/37579/Managed-Extensibility-Framework-Part https://emcpadden.wordpress.com/2008/12/07/managed-extensibility-framework-and-others/