Example #1
0
        private IEnumerable <IEntityProvider> GetEntityProviders()
        {
            IEnumerable <IEntityProvider> r = null;

            using (var catalog = new DirectoryCatalog(Path.Combine(_acDomain.GetPluginBaseDirectory(PluginType.EntityProvider), "Bin")))
                using (var container = new CompositionContainer(catalog))
                {
                    var infoValueConverterImport = new EntityProviderImport();
                    infoValueConverterImport.ImportsSatisfied += (sender, e) =>
                    {
                        r = e.EntityProviders;
                    };
                    container.ComposeParts(infoValueConverterImport);
                }
            return(r);
        }
Example #2
0
 private IEnumerable<IEntityProvider> GetEntityProviders()
 {
     IEnumerable<IEntityProvider> r = null;
     using (var catalog = new DirectoryCatalog(Path.Combine(_acDomain.GetPluginBaseDirectory(PluginType.EntityProvider), "Bin")))
     using (var container = new CompositionContainer(catalog))
     {
         var infoValueConverterImport = new EntityProviderImport();
         infoValueConverterImport.ImportsSatisfied += (sender, e) =>
         {
             r = e.EntityProviders;
         };
         container.ComposeParts(infoValueConverterImport);
     }
     return r;
 }