Download presentation
Presentation is loading. Please wait.
Published byNatasha Scrivens Modified over 10 years ago
1
Glenn Block Program Manager Microsoft Corporation TL33 TL49 Related sessions
2
FunFeasibleFly FrupendousFast Flavorful Fabulous
7
http://www.flickr.com/photos/21507453@N08/2096004461/
10
Application Extension A Extension B Need a Toolwindow Got a Toolwindow Need Menus Need Menus Got a Menu Need a MenuService Got a MenuService
11
Glenn Block Program Manager MEF
12
Import Export
13
Extension A Application Extension B Need Menus Need Menus Got Menus Got a MenuService Need a Toolwindow Export MenuService Import Menus Export Menus Need a MenuService Import MenuService Import Toolwindow Got a Toolwindow Export Toolwindow
14
Extension A Part B Application Extension B Part A Part C
15
public interface IToolWindow { } public interface IMenuService { } public interface IMenu { } public class Application { [Import] public IEnumerable ToolWindows { get; set; } [Import] public IEnumerable Menus { get; set; } } [Export(typeof(IMenuService))] public class MenuService : IMenuService { } Import Toolwindows Import Menus Export a Menu Service Export a Menu Service
16
[Export(typeof(IToolWindow))] public class SomeToolWindow : IToolWindow { [Import] public IMenuService MenuService { get; set; } } [Export(typeof(IMenu))] public class SomeMenu : IMenu {} Export a Toolwindow Import a MenuService Import a MenuService Export a Menu Export a Menu
19
Part A
20
Contract Part B Part A
21
Part B Import
22
Export Part B
23
Container
24
http://www.flickr.com/photos/jenlightjenlight/58730309/sizes/o/
25
Catalog Container
26
Part B Part A Export Export
27
Container Part A Singleton Part A Factory
28
FunFeasibleFly FrupendousFast Flavorful Fabulous
29
MEF on Codeplex (including samples and full source!!!) http://tinyurl.com/MEFHome Programming Guide: http://tinyurl.com/MEFGuide Discussions: http://tinyurl.com/MEFDiscussions Team Blogs: http://tinyurl.com/MEFBlogs Email me: gblock@microsoft.com
31
Please fill out your evaluation for this session at: This session will be available as a recording at: www.microsoftpdc.com
33
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.