Какая польза от использования атрибута импорта и экспорта в mef с использованием .NET 4.0 ?
i read on some sites bout mef framework and not understand any thing can you tell me why using export and import attributes and what is befit ? please show me any simple example ?
Что я уже пробовал:
using System.ComponentModel.Composition; using MefShared.Interfaces; namespace MefAuthentication { [Export(typeof(IAuthentication))] [ExportMetadata("AuthenticationType", "3")] public class ThirdAuthentication : IAuthentication { public string Authenticate(string username, string password) { return "Authentication Implementation 3 is invoked"; } } } Here is export why use export here I already use inheritance so why use Export