Your SlideShare is downloading. ×
0
MEF
MEF
MEF
MEF
MEF
MEF
MEF
MEF
MEF
MEF
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

MEF

873

Published on

This is a presentation about MEF (Managed Extensibility Framework). Here you can get quick overview

This is a presentation about MEF (Managed Extensibility Framework). Here you can get quick overview

Published in: Education, Technology, Business
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
873
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
26
Comments
0
Likes
3
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. How to… Yuriy Seniuk http://yuriyseniuk.blogspot.com/
  • 2.  Managed Extensibility Framework  Open Source
  • 3.  Makes extensible your Apps  Speed-up!
  • 4.  Think of the task  Declare Export  Declare Import  Compose Both together
  • 5.  [System.ComponentModel.Composition.ExportAttribute]  [Export]  public class Plugin1{...}  [Export(typeof(Plugin2))]  public class Plugin2 {...}  [Export(“MitaTeknik.Plugin")]  public class Plugin3 {...}  [Export(typeof(IPlugin))]  public class Plugin4: IPlugin{…}
  • 6.  [System.ComponentModel.Composition.ImportAttribute]  [Import]  public Plugin1 Plugin {get ;set; }  [Import(typeof(Plugin2))]  public Plugin2 Plugin2 {get ;set; }}  [Import(“MitaTeknik.Plugin")]  public Plugin3 Plugin {get ;set; }  [Import(typeof(IPlugin))]  public IPlugin Plugin4 {get ;set; }
  • 7.  [System.ComponentModel.Composition.Hosting.AssemblyCatalog]  var catalog = new AssemblyCatalog(“Assembly”);  var catalog = new DirectoryCatalog(“Extensions");  var catalog = new AggregateCatalog( new AssemblyCatalog(“Assembly”), new DirectoryCatalog("Extensions"));  var container = new CompositionContainer(catalog);  var batch = new CompositionBatch(); batch.AddPart( this ); container.Compose(batch);
  • 8.  http://mef.codeplex.com/  http://channel9.msdn.com/shows/SilverlightTV/Silverlight-TV-7-When- and-Where-to-use-MEF/  http://channel9.msdn.com/shows/SilverlightTV/Silverlight-TV-Episode-4- 3-Steps-to-MEF-Export-Import-Compose/  http://channel9.msdn.com/shows/SilverlightTV/Silverlight-TV-Episode-5- Using-Metadata-with-MEF/

×