如何创建使用MEF插件的批处理系统? [英] How do I create a batch system that uses plugin with MEF ?

查看:77
本文介绍了如何创建使用MEF插件的批处理系统?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要创建一个系统来执行一些预定的工作。

我认为这是MEF的工作。

我的想法是有一个中心点,我可以以MEF插件的形式附加一些其他组件。

例如,我希望有一个数据源类,一个数据目标类和一个转换规则类。

我需要特定的具体类(从基类派生)我想在源,目标和转换方面使用。

在运行时期间,引擎必须从源读取数据,传递数据转换类并使用目标的数据源写入输出。



哪个使用最好的OOD模式来解决这个问题?

你知道我在哪里可以找到一些示例代码或教程吗?



问候

Maurizio

解决方案

嗨Maurizio,



看看我的文章:



使用MEF的最简单方法完全懒惰的DLL加载 [ ^ ]





对OOD模式使用接口方法: )

I need to create a system to execute some scheduled jobs.
I considered it's a job for MEF.
The idea is to have a central blok where I can attach some other components in the form of MEF plugins.
For example I would like to have a class for data source, a class for data destination and a class for transformation rule.
I need to specific wich concrete class (derived from base class) I would like to use in terms of source, destination and transformation.
During the runtime the engine must read data from sources, pass data to the transformation class and write the otput with the data source for the destination.

wich use the best OOD Pattern for this problem ?
Do you know where I can find some example code or tutorial ?

Regards
Maurizio

解决方案

Hi Maurizio,

Just look on my article:

The Simplest Way to use MEF Fully Lazy DLL Loading[^]


Use the "interfaces" approach for OOD pattern :)


这篇关于如何创建使用MEF插件的批处理系统?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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