如何构建一个实现插件的C#控制台应用程序? [英] How to architect a C# console application that implements plugins?

查看:83
本文介绍了如何构建一个实现插件的C#控制台应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的工作中有一个项目来创建一个使用C#实现插件样式的单一控制台应用程序。 该决议必须包含至少两个插件
程序集,以及可能需要的任何支持程序集。 主控制台应用程序和插件程序集必须没有彼此直接引用。


I have a project at my work to create a single console application that implements a plugin style using C#.  The resolution must contain at least two plugin assemblies, as well as any support assemblies that could be needed.  The main console application and plugin assemblies must have no direct references with each other’s.

解决方案是检测和加载插件,并通过调用每个
中将返回唯一字符串输出的已知方法来调用这些插件中的代码。 

应用程序必须将输出生成到控制台。   

The application must produce the outputs to the console.  

我想它可以用  <解决strong> 反思,
然而我做ASP.NET,Linq和SQL Sever的设计和开发工作。然而,现在在工作中,任何意外的员工都可能被要求解决。 

I suppose it could be solve using Reflection, however I do ASP.NET, Linq and SQL Sever design and development work.  However these days at a job anything unexpected an employee could be asked to solve. 

因此,非常感谢您的帮助。 

Therefore yours assistance will be greatly appreciated. 

推荐答案

查看 MEF


这篇关于如何构建一个实现插件的C#控制台应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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