MEF插件使用安全和配置文件Efficency [英] MEF Plugins with Security and Profiles Efficency

查看:364
本文介绍了MEF插件使用安全和配置文件Efficency的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有了许多模块/插件的应用程序。我使用MEF与目录插件来导入。每个用户具有存储在数据库中可用的模块的列表和每个用户可以有多个配置文件控制哪些模块是可见的。

I have an application that has many modules/plugins. I am using MEF with a Directory plugin to import them. Each user has a list of available modules stored in a database and each user can have multiple profiles controlling which modules are visible.

有是表示一个[ImportMany(typeof运算(的IModule)]属性从所有可见模块的信息总览区。

There is an overview area showing information from all visible modules with an [ImportMany(typeof(IModule)] attribute.

什么是处理这种使无形的或无法访问的模块没有在内存中创建一个很好的方式。

What is a good way of handling this so that invisible or inaccessible modules are not created in memory.

推荐答案

<一个HREF =htt​​p://mef.codeplex.com/wikipage?title=Lazy%20Exports&ref​​erringTitle=Guide相对=nofollow>延迟加载它们将确保他们不会被初始化或加载到内存中,然后使用元数据找到该模块的名称和细节。

Lazy loading them will ensure they are not initialised or loaded into memory. Then use metadata to find the module names and details.

这篇关于MEF插件使用安全和配置文件Efficency的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆