private IEnumerable <IMessageTransfer> GetTransfers() { IEnumerable <IMessageTransfer> r = null; using (var catalog = new DirectoryCatalog(Path.Combine(_acDomain.GetPluginBaseDirectory(PluginType.MessageTransfer), "Bin"))) using (var container = new CompositionContainer(catalog)) { var infoValueConverterImport = new MessageTransferImport(); infoValueConverterImport.ImportsSatisfied += (sender, e) => { r = e.Transfers; }; container.ComposeParts(infoValueConverterImport); } return(r); }
private IEnumerable<IMessageTransfer> GetTransfers() { IEnumerable<IMessageTransfer> r = null; using (var catalog = new DirectoryCatalog(Path.Combine(_acDomain.GetPluginBaseDirectory(PluginType.MessageTransfer), "Bin"))) using (var container = new CompositionContainer(catalog)) { var infoValueConverterImport = new MessageTransferImport(); infoValueConverterImport.ImportsSatisfied += (sender, e) => { r = e.Transfers; }; container.ComposeParts(infoValueConverterImport); } return r; }